Skip to content

Commit 9655a45

Browse files
mortalYoungwewoor
authored andcommitted
fix: fix editor size render incorrect when toggle the sidebar
1 parent 366a635 commit 9655a45

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/style/mo.scss

+4
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@
6060
.center {
6161
text-align: center;
6262
}
63+
64+
.hidden {
65+
display: none;
66+
}

src/workbench/workbench.tsx

+8-9
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,14 @@ export function WorkbenchView(props: IWorkbench & ILayout & ILayoutController) {
8585
allowResize={true}
8686
onChange={onPaneSizeChange as any}
8787
>
88-
{!sidebar.hidden && (
89-
<Pane
90-
minSize="170px"
91-
initialSize={splitPanePos[0]}
92-
maxSize="80%"
93-
>
94-
<SidebarView />
95-
</Pane>
96-
)}
88+
<Pane
89+
minSize="170px"
90+
initialSize={splitPanePos[0]}
91+
maxSize="80%"
92+
className={sidebar.hidden && 'hidden'}
93+
>
94+
<SidebarView />
95+
</Pane>
9796
<SplitPane
9897
primary="first"
9998
split="horizontal"

0 commit comments

Comments
 (0)