🎨 Improve dragging of headings or list items to the doc tree https://github.com/siyuan-note/siyuan/issues/13170

This commit is contained in:
Daniel 2024-11-29 09:07:17 +08:00
parent 6f7e106be4
commit 11640f777a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 19 additions and 11 deletions

View file

@ -394,7 +394,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath, previousPath string) (sr
newTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
newTree.Root.Spec = "1"
if "" != previousPath {
box.addSort(util.GetTreeID(previousPath), newTree.ID)
box.addSort(previousPath, newTree.ID)
} else {
box.addMinSort(path.Dir(newTargetPath), newTree.ID)
}