mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve dragging of headings or list items to the doc tree https://github.com/siyuan-note/siyuan/issues/13170
This commit is contained in:
parent
8bc3186976
commit
b6cd6930c7
4 changed files with 121 additions and 19 deletions
|
|
@ -214,8 +214,15 @@ func heading2Doc(c *gin.Context) {
|
|||
|
||||
srcHeadingID := arg["srcHeadingID"].(string)
|
||||
targetNotebook := arg["targetNoteBook"].(string)
|
||||
targetPath := arg["targetPath"].(string)
|
||||
srcRootBlockID, targetPath, err := model.Heading2Doc(srcHeadingID, targetNotebook, targetPath)
|
||||
var targetPath string
|
||||
if arg["targetPath"] != nil {
|
||||
targetPath = arg["targetPath"].(string)
|
||||
}
|
||||
var previousPath string
|
||||
if arg["previousPath"] != nil {
|
||||
previousPath = arg["previousPath"].(string)
|
||||
}
|
||||
srcRootBlockID, targetPath, err := model.Heading2Doc(srcHeadingID, targetNotebook, targetPath, previousPath)
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -259,8 +266,15 @@ func li2Doc(c *gin.Context) {
|
|||
|
||||
srcListItemID := arg["srcListItemID"].(string)
|
||||
targetNotebook := arg["targetNoteBook"].(string)
|
||||
targetPath := arg["targetPath"].(string)
|
||||
srcRootBlockID, targetPath, err := model.ListItem2Doc(srcListItemID, targetNotebook, targetPath)
|
||||
var targetPath string
|
||||
if arg["targetPath"] != nil {
|
||||
targetPath = arg["targetPath"].(string)
|
||||
}
|
||||
var previousPath string
|
||||
if arg["previousPath"] != nil {
|
||||
previousPath = arg["previousPath"].(string)
|
||||
}
|
||||
srcRootBlockID, targetPath, err := model.ListItem2Doc(srcListItemID, targetNotebook, targetPath, previousPath)
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue