This commit is contained in:
Vanessa 2022-11-16 22:59:13 +08:00
parent 364c4b7719
commit cb58fb0f42
2 changed files with 10 additions and 3 deletions

View file

@ -428,9 +428,9 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {
export const resizeDrag = () => {
const dragElement = document.getElementById("drag");
const width = dragElement.clientWidth;
const left = dragElement.getBoundingClientRect().left;
const windowWidth = document.querySelector("#windowControls").clientWidth;
const right = (windowWidth ? windowWidth : 5) + document.querySelector("#barSearch").clientWidth * 4;
const dragRect = dragElement.getBoundingClientRect()
const left = dragRect.left;
const right = window.innerWidth - dragRect.right;
if (left > right && left - right < width) {
dragElement.style.paddingRight = (left - right) + "px";
} else if (left < right && right - left < width) {