Vanessa 2023-06-30 09:05:25 +08:00
parent 988c2ef8da
commit 8946114656
2 changed files with 2 additions and 4 deletions

View file

@ -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],

View file

@ -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"),
}]);
}