mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
3de02dc59e
commit
941fb7b514
1 changed files with 26 additions and 0 deletions
|
|
@ -295,6 +295,19 @@ const dragSame = (protyle: IProtyle, sourceElements: Element[], targetElement: E
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
undoOperations.reverse();
|
undoOperations.reverse();
|
||||||
|
if (newSourceElement.getAttribute("data-subtype") === "o") {
|
||||||
|
undoOperations.splice(0, 0,{
|
||||||
|
action: "update",
|
||||||
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
data: newSourceElement.outerHTML
|
||||||
|
});
|
||||||
|
updateListOrder(newSourceElement, 1);
|
||||||
|
doOperations.push({
|
||||||
|
action: "update",
|
||||||
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
data: newSourceElement.outerHTML
|
||||||
|
});
|
||||||
|
}
|
||||||
undoOperations.push({
|
undoOperations.push({
|
||||||
action: "delete",
|
action: "delete",
|
||||||
id: newSourceElement.getAttribute("data-node-id"),
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
|
@ -369,6 +382,19 @@ const dragSame = (protyle: IProtyle, sourceElements: Element[], targetElement: E
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
undoOperations.reverse();
|
undoOperations.reverse();
|
||||||
|
if (newSourceElement.getAttribute("data-subtype") === "o") {
|
||||||
|
undoOperations.splice(0, 0,{
|
||||||
|
action: "update",
|
||||||
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
data: newSourceElement.outerHTML
|
||||||
|
});
|
||||||
|
updateListOrder(newSourceElement, 1);
|
||||||
|
doOperations.push({
|
||||||
|
action: "update",
|
||||||
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
data: newSourceElement.outerHTML
|
||||||
|
});
|
||||||
|
}
|
||||||
undoOperations.push({
|
undoOperations.push({
|
||||||
action: "delete",
|
action: "delete",
|
||||||
id: newSourceElement.getAttribute("data-node-id"),
|
id: newSourceElement.getAttribute("data-node-id"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue