Skip to content

Commit

Permalink
fix: fix editor size render incorrect when toggle the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
mortalYoung authored and wewoor committed Sep 14, 2021
1 parent 366a635 commit 9655a45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/style/mo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@
.center {
text-align: center;
}

.hidden {
display: none;
}
17 changes: 8 additions & 9 deletions src/workbench/workbench.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ export function WorkbenchView(props: IWorkbench & ILayout & ILayoutController) {
allowResize={true}
onChange={onPaneSizeChange as any}
>
{!sidebar.hidden && (
<Pane
minSize="170px"
initialSize={splitPanePos[0]}
maxSize="80%"
>
<SidebarView />
</Pane>
)}
<Pane
minSize="170px"
initialSize={splitPanePos[0]}
maxSize="80%"
className={sidebar.hidden && 'hidden'}
>
<SidebarView />
</Pane>
<SplitPane
primary="first"
split="horizontal"
Expand Down

0 comments on commit 9655a45

Please sign in to comment.