From 894611465688333e2351db9b19f28abc6cd3b4d8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 30 Jun 2023 09:05:25 +0800 Subject: [PATCH] :sparkles: https://github.com/siyuan-note/siyuan/issues/7536 --- app/src/protyle/render/av/action.ts | 3 +-- app/src/protyle/util/editorCommonEvent.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index d9cbf487c..6bdce785e 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -101,11 +101,10 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a click() { transaction(protyle, [{ action: "removeAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), + srcIDs: [rowId], parentID: blockElement.getAttribute("data-av-id"), }], [{ action: "insertAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), parentID: blockElement.getAttribute("data-av-id"), previousID: rowElement.previousElementSibling?.getAttribute("data-id") || "", srcIDs: [rowId], diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 36afc44d8..95882878d 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -804,13 +804,12 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { } transaction(protyle, [{ action: "insertAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), parentID: blockElement.getAttribute("data-av-id"), previousID, srcIDs: sourceIds, }], [{ action: "removeAttrViewBlock", - id: targetElement.getAttribute("data-node-id"), + srcIDs: sourceIds, parentID: targetElement.getAttribute("data-av-id"), }]); }