mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
This commit is contained in:
parent
8d20f37198
commit
b3f6c40835
2 changed files with 3 additions and 3 deletions
|
@ -229,7 +229,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return true;
|
return true;
|
||||||
} else if (target.classList.contains("av__calc")) {
|
} else if (target.classList.contains("av__calc")) {
|
||||||
openCalcMenu(protyle, target);
|
openCalcMenu(protyle, target, undefined, event.clientX - 64);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -79,7 +79,7 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
|
||||||
data: IAV,
|
data: IAV,
|
||||||
colId: string,
|
colId: string,
|
||||||
blockID: string
|
blockID: string
|
||||||
}) => {
|
}, x?: number) => {
|
||||||
let rowElement: HTMLElement | false;
|
let rowElement: HTMLElement | false;
|
||||||
let type;
|
let type;
|
||||||
let colId: string;
|
let colId: string;
|
||||||
|
@ -403,7 +403,7 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const calcRect = calcElement.getBoundingClientRect();
|
const calcRect = calcElement.getBoundingClientRect();
|
||||||
menu.open({x: calcRect.left, y: calcRect.bottom, h: calcRect.height});
|
menu.open({x: Math.max(x || 0, calcRect.left), y: calcRect.bottom, h: calcRect.height});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCalcValue = (column: IAVColumn) => {
|
export const getCalcValue = (column: IAVColumn) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue