mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
This commit is contained in:
parent
1e12bfeadd
commit
a53079d2b5
3 changed files with 14 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ let firstDirection: "toLeft" | "toRight";
|
|||
let firstXY: "x" | "y";
|
||||
let lastClientX: number; // 和起始方向不一致时,记录最后一次的 clientX
|
||||
let scrollBlock: boolean;
|
||||
let isFirstMove = true;
|
||||
|
||||
const popSide = (render = true) => {
|
||||
if (render) {
|
||||
|
|
@ -32,6 +33,7 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
|
|||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
isFirstMove = true;
|
||||
const target = event.target as HTMLElement;
|
||||
if (!clientY || typeof yDiff === "undefined" ||
|
||||
target.tagName === "AUDIO" ||
|
||||
|
|
@ -153,6 +155,7 @@ export const handleTouchStart = (event: TouchEvent) => {
|
|||
time = 0;
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
isFirstMove = true;
|
||||
scrollBlock = false;
|
||||
};
|
||||
|
||||
|
|
@ -251,7 +254,12 @@ export const handleTouchMove = (event: TouchEvent) => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isFirstMove) {
|
||||
sideMaskElement.style.zIndex = (++window.siyuan.zIndex).toString();
|
||||
document.getElementById("sidebar").style.zIndex = (++window.siyuan.zIndex).toString();
|
||||
document.getElementById("menu").style.zIndex = (++window.siyuan.zIndex).toString();
|
||||
isFirstMove = false;
|
||||
}
|
||||
const windowWidth = window.innerWidth;
|
||||
const menuElement = hasClosestByAttribute(target, "id", "menu");
|
||||
if (menuElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue