dasdasd
This commit is contained in:
@@ -977,13 +977,17 @@ if (payloadNode) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const clampWindowLayout = (record) => {
|
const clampWindowLayout = (record) => {
|
||||||
const maxWidth = Math.max(320, window.innerWidth - 48);
|
const minX = 0;
|
||||||
const maxHeight = Math.max(220, window.innerHeight - bottomDesktopInset - 24);
|
const minY = maximizeOverSystemBar ? 0 : topDesktopInset;
|
||||||
|
const maxWidth = Math.max(320, window.innerWidth - minX - sideDesktopInset);
|
||||||
|
|
||||||
record.layout.width = Math.max(320, Math.min(record.layout.width, maxWidth));
|
record.layout.width = Math.max(320, Math.min(record.layout.width, maxWidth));
|
||||||
|
record.layout.x = Math.max(minX, Math.min(record.layout.x, window.innerWidth - record.layout.width));
|
||||||
|
record.layout.y = Math.max(minY, Math.min(record.layout.y, window.innerHeight - bottomDesktopInset - 220));
|
||||||
|
|
||||||
|
const maxHeight = Math.max(220, window.innerHeight - bottomDesktopInset - record.layout.y);
|
||||||
record.layout.height = Math.max(220, Math.min(record.layout.height, maxHeight));
|
record.layout.height = Math.max(220, Math.min(record.layout.height, maxHeight));
|
||||||
record.layout.x = Math.max(0, Math.min(record.layout.x, window.innerWidth - record.layout.width));
|
record.layout.y = Math.max(minY, Math.min(record.layout.y, window.innerHeight - bottomDesktopInset - record.layout.height));
|
||||||
record.layout.y = Math.max(0, Math.min(record.layout.y, window.innerHeight - bottomDesktopInset - record.layout.height));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleMinimize = (windowId) => {
|
const toggleMinimize = (windowId) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user