mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 Generate document history when dragging outline https://github.com/siyuan-note/siyuan/issues/10834
This commit is contained in:
parent
c6d69fd6f8
commit
0c4ebbeea0
1 changed files with 6 additions and 0 deletions
|
|
@ -83,6 +83,8 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generateFormatHistory(tree)
|
||||||
|
|
||||||
targetNode := previousHeading
|
targetNode := previousHeading
|
||||||
previousHeadingChildren := treenode.HeadingChildren(previousHeading)
|
previousHeadingChildren := treenode.HeadingChildren(previousHeading)
|
||||||
if 0 < len(previousHeadingChildren) {
|
if 0 < len(previousHeadingChildren) {
|
||||||
|
|
@ -128,6 +130,8 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generateFormatHistory(tree)
|
||||||
|
|
||||||
targetNode := parentHeading
|
targetNode := parentHeading
|
||||||
parentHeadingChildren := treenode.HeadingChildren(parentHeading)
|
parentHeadingChildren := treenode.HeadingChildren(parentHeading)
|
||||||
|
|
||||||
|
|
@ -168,6 +172,8 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
||||||
}
|
}
|
||||||
targetNode.InsertAfter(heading)
|
targetNode.InsertAfter(heading)
|
||||||
} else {
|
} else {
|
||||||
|
generateFormatHistory(tree)
|
||||||
|
|
||||||
// 移到最前
|
// 移到最前
|
||||||
for i := len(headingChildren) - 1; i >= 0; i-- {
|
for i := len(headingChildren) - 1; i >= 0; i-- {
|
||||||
child := headingChildren[i]
|
child := headingChildren[i]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue