Skip to content

Commit caabc04

Browse files
committed
Cherry picked changes after rebase
1 parent 594146c commit caabc04

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

webapp/components/general/NetPyNEPythonConsole.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,26 @@ export class NetPyNEPythonConsole extends Component {
104104

105105
render () {
106106
const notebookName = GEPPETTO_CONFIGURATION.notebookName || "notebook.ipynb";
107+
const offScreenLeft = -window.innerWidth - 100; //plus additional buffer just in case
108+
109+
const iframeStyle = {
110+
position: 'absolute',
111+
left: `${offScreenLeft}px`,
112+
width: '1px',
113+
height: '1px',
114+
};
115+
107116
return (
108117
<ReactResizeDetector handleWidth handleHeight>
109-
{({ width, height }) => <PythonConsole pythonNotebookPath={`notebooks/${notebookName}`} extensionLoaded={this.props.extensionLoaded} iframeHeight={height} />}
110-
</ReactResizeDetector>
118+
{({ width, height }) => (
119+
<PythonConsole
120+
pythonNotebookPath={`notebooks/${notebookName}`}
121+
extensionLoaded={this.props.extensionLoaded}
122+
iframeHeight={height}
123+
style={iframeStyle}
124+
/>
125+
)}
126+
</ReactResizeDetector>
111127
);
112128
}
113129
}

0 commit comments

Comments
 (0)