|
@@ -46,7 +46,21 @@ export const fullscreen = (element: Element, btnElement?: Element) => {
|
|
element.classList.add("fullscreen");
|
|
element.classList.add("fullscreen");
|
|
document.getElementById("drag")?.classList.add("fn__hidden");
|
|
document.getElementById("drag")?.classList.add("fn__hidden");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (isWindow()) {
|
|
|
|
+ // 编辑器全屏
|
|
|
|
+ /// #if !MOBILE
|
|
|
|
+ const wndsTemp: Wnd[] = [];
|
|
|
|
+ getAllWnds(window.siyuan.layout.layout, wndsTemp);
|
|
|
|
+ wndsTemp.find(async item => {
|
|
|
|
+ const headerElement = item.headersElement.parentElement;
|
|
|
|
+ if (headerElement.getBoundingClientRect().top <= 0) {
|
|
|
|
+ // @ts-ignore
|
|
|
|
+ (headerElement.querySelector(".item--readonly .fn__flex-1") as HTMLElement).style.WebkitAppRegion = isFullscreen ? "drag" : "";
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ /// #endif
|
|
|
|
+ }
|
|
if (btnElement) {
|
|
if (btnElement) {
|
|
if (isFullscreen) {
|
|
if (isFullscreen) {
|
|
btnElement.querySelector("use").setAttribute("xlink:href", "#iconFullscreen");
|
|
btnElement.querySelector("use").setAttribute("xlink:href", "#iconFullscreen");
|
|
@@ -64,20 +78,6 @@ export const fullscreen = (element: Element, btnElement?: Element) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
- } else if (isWindow()) {
|
|
|
|
- // 编辑器全屏
|
|
|
|
- /// #if !MOBILE
|
|
|
|
- const wndsTemp: Wnd[] = [];
|
|
|
|
- getAllWnds(window.siyuan.layout.layout, wndsTemp);
|
|
|
|
- wndsTemp.find(async item => {
|
|
|
|
- const headerElement = item.headersElement.parentElement;
|
|
|
|
- if (headerElement.getBoundingClientRect().top <= 0) {
|
|
|
|
- // @ts-ignore
|
|
|
|
- (headerElement.querySelector(".item--readonly .fn__flex-1") as HTMLElement).style.WebkitAppRegion = isFullscreen ? "drag" : "";
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- /// #endif
|
|
|
|
}
|
|
}
|
|
/// #if !MOBILE
|
|
/// #if !MOBILE
|
|
if (element.classList.contains("protyle")) {
|
|
if (element.classList.contains("protyle")) {
|