mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 00:14:07 +01:00
This commit is contained in:
parent
aa2f05dcb5
commit
520c2aec7d
6 changed files with 63 additions and 85 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue