|
@@ -12,19 +12,19 @@ const getAllWnds = (layout: Layout, wnds: Wnd[]) => {
|
|
getAllWnds(item, wnds);
|
|
getAllWnds(item, wnds);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+};
|
|
export const setTabPosition = () => {
|
|
export const setTabPosition = () => {
|
|
if (!isWindow()) {
|
|
if (!isWindow()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const wndsTemp: Wnd[] = []
|
|
|
|
|
|
+ const wndsTemp: Wnd[] = [];
|
|
getAllWnds(window.siyuan.layout.layout, wndsTemp);
|
|
getAllWnds(window.siyuan.layout.layout, wndsTemp);
|
|
wndsTemp.forEach(item => {
|
|
wndsTemp.forEach(item => {
|
|
const headerElement = item.headersElement.parentElement;
|
|
const headerElement = item.headersElement.parentElement;
|
|
- const rect = headerElement.getBoundingClientRect()
|
|
|
|
- const dragElement = headerElement.querySelector('.item--readonly .fn__flex-1') as HTMLElement
|
|
|
|
|
|
+ const rect = headerElement.getBoundingClientRect();
|
|
|
|
+ const dragElement = headerElement.querySelector(".item--readonly .fn__flex-1") as HTMLElement;
|
|
if (rect.top <= 0) {
|
|
if (rect.top <= 0) {
|
|
- dragElement.style.height = dragElement.parentElement.clientHeight + "px"
|
|
|
|
|
|
+ dragElement.style.height = dragElement.parentElement.clientHeight + "px";
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
dragElement.style.WebkitAppRegion = "drag";
|
|
dragElement.style.WebkitAppRegion = "drag";
|
|
} else {
|
|
} else {
|
|
@@ -44,5 +44,5 @@ export const setTabPosition = () => {
|
|
(headerElement.lastElementChild as HTMLElement).style.paddingRight = "";
|
|
(headerElement.lastElementChild as HTMLElement).style.paddingRight = "";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- })
|
|
|
|
-}
|
|
|
|
|
|
+ });
|
|
|
|
+};
|