mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 08:54:07 +01:00
💄
This commit is contained in:
parent
5c90a6ffbe
commit
1373d3d10b
7 changed files with 14 additions and 7 deletions
|
|
@ -86,7 +86,7 @@ export const initWindowEvent = (app: App) => {
|
|||
const dockElement = hasClosestByClassName(target, "dock__item");
|
||||
if (dockElement && dockElement.getAttribute("data-type")) {
|
||||
const dockRect = dockElement.getBoundingClientRect()
|
||||
initDockMenu(dockElement).popup({x: dockRect.right, y: dockRect.bottom});
|
||||
initDockMenu(dockElement).popup({x: dockRect.right, y: dockRect.top});
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
return;
|
||||
|
|
@ -97,7 +97,8 @@ export const initWindowEvent = (app: App) => {
|
|||
if (tabElement) {
|
||||
const tabRect = tabElement.getBoundingClientRect()
|
||||
initTabMenu(app, (getInstanceById(tabElement.getAttribute("data-id")) as Tab)).popup({
|
||||
x: tabRect.left, y: tabRect.bottom
|
||||
x: tabRect.left,
|
||||
y: tabRect.bottom
|
||||
});
|
||||
hideTooltip()
|
||||
event.stopImmediatePropagation();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const globalTouchEnd = (event: TouchEvent, yDiff: number, time: number, a
|
|||
const menu = initNavigationMenu(app, fileItemElement);
|
||||
if (isIPadBoolean) {
|
||||
const rect = fileItemElement.getBoundingClientRect()
|
||||
menu.popup({x: rect.right, y: rect.bottom, h: rect.height})
|
||||
menu.popup({x: rect.right - 52, y: rect.bottom, h: rect.height})
|
||||
hideTooltip()
|
||||
} else {
|
||||
window.siyuan.menus.menu.fullscreen("bottom");
|
||||
|
|
@ -33,7 +33,7 @@ export const globalTouchEnd = (event: TouchEvent, yDiff: number, time: number, a
|
|||
const menu = initFileMenu(app, rootElement.dataset.url, fileItemElement.dataset.path, fileItemElement);
|
||||
if (isIPadBoolean) {
|
||||
const rect = fileItemElement.getBoundingClientRect()
|
||||
menu.popup({x: rect.right, y: rect.bottom, h: rect.height})
|
||||
menu.popup({x: rect.right - 52, y: rect.bottom, h: rect.height})
|
||||
hideTooltip()
|
||||
} else {
|
||||
window.siyuan.menus.menu.fullscreen("bottom");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue