File tree Expand file tree Collapse file tree 3 files changed +18
-35
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +18
-35
lines changed Original file line number Diff line number Diff line change @@ -768,17 +768,7 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
768768 } ,
769769
770770 __iFrameStateChanged : function ( node ) {
771- this . __iframePage . removeAll ( ) ;
772-
773- if ( node && node . getIFrame ( ) ) {
774- const loadingPage = node . getLoadingPage ( ) ;
775- const iFrame = node . getIFrame ( ) ;
776- const src = iFrame . getSource ( ) ;
777- const iFrameView = ( src === null || src === "about:blank" ) ? loadingPage : iFrame ;
778- this . __iframePage . add ( iFrameView , {
779- flex : 1
780- } ) ;
781- }
771+ osparc . node . slideshow . NodeView . handleIframeStateChange ( node , this . __iframePage ) ;
782772 } ,
783773
784774 __populateSecondaryColumn : function ( node ) {
Original file line number Diff line number Diff line change @@ -40,6 +40,21 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
4040 LOGGER_HEIGHT : 28 ,
4141 } ,
4242
43+ statics : {
44+ handleIframeStateChange : function ( node , iframeLayout ) {
45+ iframeLayout . removeAll ( ) ;
46+ if ( node && node . getIFrame ( ) ) {
47+ const loadingPage = node . getLoadingPage ( ) ;
48+ const iFrame = node . getIFrame ( ) ;
49+ const src = iFrame . getSource ( ) ;
50+ const iFrameView = ( src === null || src === "about:blank" ) ? loadingPage : iFrame ;
51+ iframeLayout . add ( iFrameView , {
52+ flex : 1
53+ } ) ;
54+ }
55+ } ,
56+ } ,
57+
4358 members : {
4459 __loggerPanel : null ,
4560
@@ -134,18 +149,7 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
134149 } ,
135150
136151 __iFrameStateChanged : function ( ) {
137- this . _iFrameLayout . removeAll ( ) ;
138-
139- const node = this . getNode ( ) ;
140- if ( node && node . getIFrame ( ) ) {
141- const loadingPage = node . getLoadingPage ( ) ;
142- const iFrame = node . getIFrame ( ) ;
143- const src = iFrame . getSource ( ) ;
144- const iFrameView = ( src === null || src === "about:blank" ) ? loadingPage : iFrame ;
145- this . _iFrameLayout . add ( iFrameView , {
146- flex : 1
147- } ) ;
148- }
152+ osparc . node . slideshow . NodeView . handleIframeStateChange ( this . getNode ( ) , this . _iFrameLayout ) ;
149153 }
150154 }
151155} ) ;
Original file line number Diff line number Diff line change @@ -89,18 +89,7 @@ qx.Class.define("osparc.viewer.NodeViewer", {
8989 } ,
9090
9191 __iFrameStateChanged : function ( ) {
92- this . _removeAll ( ) ;
93-
94- if ( this . getNode ( ) && this . getNode ( ) . getIframeHandler ( ) ) {
95- const iframeHandler = this . getNode ( ) . getIframeHandler ( ) ;
96- const loadingPage = iframeHandler . getLoadingPage ( ) ;
97- const iFrame = iframeHandler . getIFrame ( ) ;
98- const src = iFrame . getSource ( ) ;
99- const iFrameView = ( src === null || src === "about:blank" ) ? loadingPage : iFrame ;
100- this . _add ( iFrameView , {
101- flex : 1
102- } ) ;
103- }
92+ osparc . node . slideshow . NodeView . handleIframeStateChange ( this . getNode ( ) , this ) ;
10493 } ,
10594
10695 __attachSocketEventHandlers : function ( ) {
You can’t perform that action at this time.
0 commit comments