1
0
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:
Kushagra Gour
2018-06-25 10:43:20 +05:30
parent d5a3fc1fcf
commit a126338fc5
2 changed files with 17 additions and 1 deletions

View File

@@ -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