Adds option to specify height of frame widget

This commit is contained in:
Alicia Sykes 2021-12-25 22:12:11 +00:00
parent 90dd351756
commit c99c517262
2 changed files with 940 additions and 931 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,11 @@
<template>
<div class="iframe-widget">
<iframe v-if="frameUrl" :src="frameUrl" :id="frameId" />
<iframe
v-if="frameUrl"
:src="frameUrl"
:id="frameId"
:style="frameHeight ? `height: ${frameHeight}px` : ''"
/>
</div>
</template>
@ -19,6 +24,9 @@ export default {
}
return usersChoice;
},
frameHeight() {
return this.options.frameHeight;
},
/* Generates an ID for the iframe */
frameId() {
return `iframe-${btoa(this.frameUrl || 'empty').substring(0, 16)}`;