Vanessa 2023-12-20 22:23:30 +08:00
parent aa2f05dcb5
commit 520c2aec7d
6 changed files with 63 additions and 85 deletions

View file

@ -89,11 +89,15 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mou
if (!targetBlockElement) {
return;
}
let rowElement: Element;
if (targetBlockElement.classList.contains("av")) {
rowElement = hasClosestByClassName(mouseElement, "av__row") as HTMLElement;
}
const allModels = getAllModels();
let findNode = false;
allModels.editor.find(item => {
if (item.editor.protyle.wysiwyg.element.isSameNode(eventPath0)) {
item.editor.protyle.gutter.render(item.editor.protyle, targetBlockElement, item.editor.protyle.wysiwyg.element);
item.editor.protyle.gutter.render(item.editor.protyle, targetBlockElement, item.editor.protyle.wysiwyg.element, rowElement);
findNode = true;
return true;
}
@ -102,7 +106,7 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mou
window.siyuan.blockPanels.find(item => {
item.editors.find(eItem => {
if (eItem.protyle.wysiwyg.element.contains(eventPath0)) {
eItem.protyle.gutter.render(eItem.protyle, targetBlockElement, eItem.protyle.wysiwyg.element);
eItem.protyle.gutter.render(eItem.protyle, targetBlockElement, eItem.protyle.wysiwyg.element, rowElement);
findNode = true;
return true;
}
@ -116,7 +120,7 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mou
allModels.backlink.find(item => {
item.editors.find(eItem => {
if (eItem.protyle.wysiwyg.element.isSameNode(eventPath0)) {
eItem.protyle.gutter.render(eItem.protyle, targetBlockElement, eItem.protyle.wysiwyg.element);
eItem.protyle.gutter.render(eItem.protyle, targetBlockElement, eItem.protyle.wysiwyg.element, rowElement);
findNode = true;
return true;
}