🎨 The outline item in the outline panel supports dragging to adjust the level and position https://github.com/siyuan-note/siyuan/issues/7957

This commit is contained in:
Daniel 2024-03-29 21:59:32 +08:00
parent e988f5373f
commit 7d6dfc8536
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -54,6 +54,16 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
})
headingChildren := treenode.HeadingChildren(heading)
var tmp []*ast.Node
// 过滤掉超级块结束节点
for _, child := range headingChildren {
if ast.NodeSuperBlockCloseMarker == child.Type {
continue
}
tmp = append(tmp, child)
}
headingChildren = tmp
if "" != previousID {
previousHeading := treenode.GetNodeInTree(tree, previousID)
if nil == previousHeading {