Vanessa 2023-07-02 21:53:02 +08:00
parent 11d582f39d
commit 2caa3b657c
8 changed files with 191 additions and 83 deletions

View file

@ -16,7 +16,13 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
}
const addElement = hasClosestByAttribute(event.target, "data-type", "av-header-add");
if (addElement) {
addCol(protyle, blockElement, addElement);
const addMenu = addCol(protyle, blockElement);
const addRect = addElement.getBoundingClientRect()
addMenu.open({
x: addRect.left,
y: addRect.bottom,
h: addRect.height
});
event.preventDefault();
event.stopPropagation();
return true;