File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
client/src/components/Visualizations Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ const emitChange = debounce((newValue: string) => {
2323const errorMessage = ref (" " );
2424const iframeRef = ref <HTMLIFrameElement | null >(null );
2525
26+ const blankPageUrl = ` ${getAppRoot ()}static/blank.html ` ;
27+
2628async function render() {
2729 if (props .name ) {
2830 try {
@@ -37,6 +39,12 @@ async function render() {
3739
3840 const iframe = iframeRef .value ;
3941 if (iframe ) {
42+ if (iframe .contentDocument ?.readyState !== " complete" ) {
43+ await new Promise <HTMLIFrameElement >((resolve ) => {
44+ iframe .onload = () => resolve (iframe );
45+ });
46+ }
47+
4048 const iframeDocument = iframe .contentDocument ;
4149 if (iframeDocument ) {
4250 const container = iframeDocument .createElement (" div" );
@@ -93,8 +101,9 @@ onMounted(() => render());
93101 </div >
94102 <iframe
95103 v-else
104+ class =" position-relative h-100 w-100 border-0"
96105 id =" galaxy_visualization"
97106 ref =" iframeRef"
98- class = " position-relative h-100 w-100 border-0 "
107+ :src = " blankPageUrl "
99108 title =" visualization" />
100109</template >
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html> < html > < head > </ head > < body > </ body > </ html >
You can’t perform that action at this time.
0 commit comments