This commit is contained in:
Vanessa 2023-11-20 12:28:20 +08:00
parent dc5551aea8
commit b8eec1bd34
10 changed files with 16 additions and 18 deletions

View file

@ -78,7 +78,7 @@ export const initWindowEvent = (app: App) => {
return;
}
// 触摸屏背景和嵌入块按钮显示
const backgroundElement = hasClosestByClassName(target, "protyle-background")
const backgroundElement = hasClosestByClassName(target, "protyle-background");
if (backgroundElement) {
if (!globalTouchStart(event)) {
backgroundElement.classList.toggle("protyle-background--mobileshow");

View file

@ -15,7 +15,7 @@ import {hideTooltip} from "../../dialog/tooltip";
export const globalTouchStart = (event: TouchEvent) => {
// 文档背景位置调整
const target = event.target as HTMLElement;
const backgroundElement = hasClosestByClassName(target, "protyle-background")
const backgroundElement = hasClosestByClassName(target, "protyle-background");
if (backgroundElement && target.tagName === "IMG" && backgroundElement.firstElementChild.querySelector(".protyle-icons").classList.contains("fn__none")) {
const contentElement = hasClosestByClassName(target, "protyle-content", true);
if (!contentElement) {
@ -45,7 +45,7 @@ export const globalTouchStart = (event: TouchEvent) => {
return true;
}
return false;
}
};
export const globalTouchEnd = (event: TouchEvent, yDiff: number, time: number, app: App) => {
const target = event.target as HTMLElement;