mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 08:24:06 +01:00
This commit is contained in:
parent
8d467c7df2
commit
ee62729dc2
31 changed files with 32 additions and 84 deletions
|
|
@ -134,13 +134,14 @@ export class Menu {
|
|||
} else {
|
||||
window.addEventListener(this.wheelEvent, this.preventDefault, {passive: false});
|
||||
}
|
||||
|
||||
this.element.style.zIndex = (++window.siyuan.zIndex).toString();
|
||||
this.element.classList.remove("fn__none");
|
||||
setPosition(this.element, options.x - (isLeft ? window.siyuan.menus.menu.element.clientWidth : 0), options.y, options.h, options.w);
|
||||
}
|
||||
|
||||
public fullscreen(position: "bottom" | "all" = "all") {
|
||||
this.element.classList.add("b3-menu--fullscreen");
|
||||
this.element.style.zIndex = (++window.siyuan.zIndex).toString();
|
||||
this.element.firstElementChild.classList.remove("fn__none");
|
||||
this.element.classList.remove("fn__none");
|
||||
window.addEventListener("touchmove", this.preventDefault, {passive: false});
|
||||
|
|
|
|||
|
|
@ -88,6 +88,5 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
|
|||
}).element);
|
||||
}
|
||||
window.siyuan.menus.menu.element.setAttribute("data-name", "bookmarkMenu");
|
||||
window.siyuan.menus.menu.element.style.zIndex = "221"; // 移动端被右侧栏遮挡
|
||||
window.siyuan.menus.menu.popup({x: event.clientX - 11, y: event.clientY + 11, h: 22, w: 12});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark") => {
|
|||
}).element);
|
||||
});
|
||||
}
|
||||
window.siyuan.menus.menu.element.style.zIndex = "310";
|
||||
window.siyuan.menus.menu.element.classList.add("b3-menu--list");
|
||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16, w: 16});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,6 +28,5 @@ export const openTagMenu = (element: HTMLElement, event: MouseEvent, labelName:
|
|||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.element.setAttribute("data-name", "tagMenu");
|
||||
window.siyuan.menus.menu.element.style.zIndex = "221"; // 移动端被右侧栏遮挡
|
||||
window.siyuan.menus.menu.popup({x: event.clientX - 11, y: event.clientY + 11, h: 22, w: 12});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue