File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import { getModulePath } from 'app/store/entities/sandboxes/modules/selectors';
99import type { Sandbox , Module , ModuleError } from 'common/types' ;
1010import fetchBundle from 'app/store/entities/sandboxes/bundler' ;
1111
12+ const MIN_HEIGHT = 250 ;
13+
1214const Container = styled . div `
1315 display: flex;
1416 position: relative;
@@ -73,11 +75,12 @@ export default class Content extends React.PureComponent {
7375
7476 handleResize = ( height : number ) => {
7577 if ( this . props . autoResize ) {
78+ const extraOffset = this . props . hideNavigation ? 75 : 150 ;
7679 window . parent . postMessage (
7780 JSON . stringify ( {
7881 src : window . location . toString ( ) ,
7982 context : 'iframe.resize' ,
80- height : Math . max ( height + 150 , 500 ) , // pixels
83+ height : Math . max ( height + extraOffset , MIN_HEIGHT ) , // pixels
8184 } ) ,
8285 '*' ,
8386 ) ;
@@ -86,7 +89,7 @@ export default class Content extends React.PureComponent {
8689 JSON . stringify ( {
8790 src : window . location . toString ( ) ,
8891 context : 'iframe.resize' ,
89- height : 500 , // pixels
92+ height : MIN_HEIGHT , // pixels
9093 } ) ,
9194 '*' ,
9295 ) ;
You can’t perform that action at this time.
0 commit comments