Unverified Commit 7062163d authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Web] Fix web layout (#2646)

* fix web layout * fix web layout
parent 0ad873e3
...@@ -512,9 +512,15 @@ const Model: ModelType = { ...@@ -512,9 +512,15 @@ const Model: ModelType = {
) { ) {
centerContentHeight = state.centerContentHeight; centerContentHeight = state.centerContentHeight;
toolContentHeight = state.toolContentHeight; toolContentHeight = state.toolContentHeight;
} else { }
centerContentHeight = state.centerContentHeight - (state.bottomContainer.height as number); else {
toolContentHeight = state.toolContentHeight - (state.bottomContainer.height as number); if (state.centerContentHeight>state.bottomContainer.height){
centerContentHeight = state.centerContentHeight - (state.bottomContainer.height as number);
toolContentHeight = state.toolContentHeight - (state.bottomContainer.height as number);
}else {
centerContentHeight = state.centerContentHeight;
toolContentHeight = state.toolContentHeight;
}
} }
return { return {
...@@ -671,6 +677,7 @@ const Model: ModelType = { ...@@ -671,6 +677,7 @@ const Model: ModelType = {
for (const [index, pane] of panes.entries()) { for (const [index, pane] of panes.entries()) {
if (pane.key === needCloseKey) { if (pane.key === needCloseKey) {
const nextPane = panes[(index + 1) % panes.length]; const nextPane = panes[(index + 1) % panes.length];
const height = document.documentElement.clientHeight - VIEW.headerHeight - VIEW.headerNavHeight - VIEW.footerHeight - VIEW.otherHeight;
return { return {
...state, ...state,
tabs: { tabs: {
...@@ -684,7 +691,9 @@ const Model: ModelType = { ...@@ -684,7 +691,9 @@ const Model: ModelType = {
footContainer: { footContainer: {
...state.footContainer, ...state.footContainer,
...getFooterValue(panes, nextPane.key) ...getFooterValue(panes, nextPane.key)
} },
toolContentHeight: panes.length < 2? height-VIEW.leftMargin : state.toolContentHeight,
centerContentHeight: panes.length < 2? height : state.toolContentHeight,
}; };
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment