mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-01 02:10:15 +01:00
🚨
This commit is contained in:
parent
dc5551aea8
commit
b8eec1bd34
10 changed files with 16 additions and 18 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue