Skip to content

Commit

Permalink
Fix a bug with pane resizing after moving between tabs and switching …
Browse files Browse the repository at this point in the history
…side panels (#355)
  • Loading branch information
ostap1010 authored Jan 17, 2019
1 parent ef2f353 commit a01eac7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/projecteditor/ProjectEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class ProjectEditor extends Component {

onPanesSizeChange() {
if (this.props.router.panes) {
this.props.router.panes.redraw(true);
this.props.router.panes.redraw(false);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/components/projecteditor/panes.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ class Panes extends Component {
if (paneObj) {
paneObj.style.display = 'block';
}
// visible pane should be drawn because of side panels
// which state is unknown to the pane
setTimeout(() => { pane.redraw(); }, 5);
} else {
var paneObj = document.getElementById(key);
if (paneObj) paneObj.style.display = 'none';
Expand Down

0 comments on commit a01eac7

Please sign in to comment.