Skip to content

Commit e945639

Browse files
committed
Forced parent div styling
1 parent d3ec768 commit e945639

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

webapp/components/general/NetPyNEPythonConsole.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ export class NetPyNEPythonConsole extends Component {
8181
height: '1px',
8282
};
8383
var iframeWindow = this.container.contentWindow;
84+
var iframeElement = iframeWindow.frameElement;
85+
var parentDiv = iframeElement.parentElement;
86+
var containerDiv = parentDiv.parentElement;
8487
const offScreenLeft = -window.innerWidth - 100; //plus additional buffer just in case
8588

8689
if (nextProps.notebookVisible)
@@ -93,6 +96,8 @@ export class NetPyNEPythonConsole extends Component {
9396
iframeWindow.left = `${offScreenLeft}px`;
9497
iframeWindow.width = '1px';
9598
iframeWindow.height = '1px';
99+
100+
containerDiv.style.display = 'block';
96101
}
97102
return false;
98103
}

webapp/test-frame/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h2>IFrame NePyNE-UI</h2>
99

1010
<!-- IFrame element -->
11-
<iframe src="http://localhost:8888/geppetto" width="1200" height="1200">
11+
<iframe src="http://localhost:8081/geppetto" width="1200" height="1200">
1212
<!-- Alternative content for browsers that do not support iframes -->
1313
<p>Your browser does not support iframes.</p>
1414
</iframe>

0 commit comments

Comments
 (0)