mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-28 17:20:13 +02:00
persist size info when it changes to fix size changing bug
This commit is contained in:
@@ -967,6 +967,12 @@ export default class App extends Component {
|
||||
this.closeAllOverlays();
|
||||
}
|
||||
|
||||
splitUpdateHandler(mainSplitInstance, codeSplitInstance) {
|
||||
// Not using setState to avoid re-render
|
||||
this.state.currentItem.sizes = this.getCodePaneSizes();
|
||||
this.state.currentItem.mainSizes = this.getMainPaneSizes();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
@@ -996,6 +1002,7 @@ export default class App extends Component {
|
||||
onRef={comp => (this.contentWrap = comp)}
|
||||
prefs={this.state.prefs}
|
||||
onEditorFocus={this.editorFocusHandler.bind(this)}
|
||||
onSplitUpdate={this.splitUpdateHandler.bind(this)}
|
||||
/>
|
||||
<div class="global-console-container" id="globalConsoleContainerEl" />
|
||||
<Footer
|
||||
|
Reference in New Issue
Block a user