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 = {
) {
centerContentHeight = state.centerContentHeight;
toolContentHeight = state.toolContentHeight;
} else {
centerContentHeight = state.centerContentHeight - (state.bottomContainer.height as number);
toolContentHeight = state.toolContentHeight - (state.bottomContainer.height as number);
}
else {
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 {
......@@ -671,6 +677,7 @@ const Model: ModelType = {
for (const [index, pane] of panes.entries()) {
if (pane.key === needCloseKey) {
const nextPane = panes[(index + 1) % panes.length];
const height = document.documentElement.clientHeight - VIEW.headerHeight - VIEW.headerNavHeight - VIEW.footerHeight - VIEW.otherHeight;
return {
...state,
tabs: {
......@@ -684,7 +691,9 @@ const Model: ModelType = {
footContainer: {
...state.footContainer,
...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