mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 23:22:33 +01:00
This commit is contained in:
parent
43391b761d
commit
5ea99c26f1
4 changed files with 25 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/// #if !MOBILE
|
||||
import {getAllModels} from "../../layout/getAll";
|
||||
import {getAllModels, getAllWnds} from "../../layout/getAll";
|
||||
/// #endif
|
||||
import {addLoading} from "../ui/initUI";
|
||||
import {fetchPost} from "../../util/fetch";
|
||||
|
|
@ -9,6 +9,8 @@ import {hasClosestByClassName} from "../util/hasClosest";
|
|||
import {reloadProtyle} from "../util/reload";
|
||||
import {resize} from "../util/resize";
|
||||
import {disabledProtyle, enableProtyle} from "../util/onGet";
|
||||
import {isWindow} from "../../util/functions";
|
||||
import {Wnd} from "../../layout/Wnd";
|
||||
|
||||
export const net2LocalAssets = (protyle: IProtyle, type: "Assets" | "Img") => {
|
||||
if (protyle.element.querySelector(".wysiwygLoading")) {
|
||||
|
|
@ -62,6 +64,20 @@ export const fullscreen = (element: Element, btnElement?: Element) => {
|
|||
}
|
||||
}
|
||||
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 (element.classList.contains("protyle")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue