mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 18:26:09 +01:00
This commit is contained in:
parent
24e929b654
commit
79a265812d
1 changed files with 6 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
|
|||
hasClosestByClassName(target, "keyboard") ||
|
||||
hasClosestByAttribute(target, "id", "commonMenu")
|
||||
) {
|
||||
closePanel();
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.mobile.editor) {
|
||||
|
|
@ -180,6 +181,11 @@ export const handleTouchMove = (event: TouchEvent) => {
|
|||
|
||||
xDiff = Math.floor(clientX - event.touches[0].clientX);
|
||||
yDiff = Math.floor(clientY - event.touches[0].clientY);
|
||||
if (Math.abs(xDiff) < Math.abs(yDiff)) {
|
||||
clientX = null;
|
||||
clientY = null;
|
||||
return;
|
||||
}
|
||||
if (!firstDirection) {
|
||||
firstDirection = xDiff > 0 ? "toLeft" : "toRight";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue