mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 05:18:49 +01:00
🎨 文档树支持 Ctrl+Click 和 Shift+↑/↓ 进行多选 https://github.com/siyuan-note/siyuan/issues/1359
This commit is contained in:
parent
47a8b0c050
commit
e3a6bb2251
4 changed files with 55 additions and 0 deletions
|
|
@ -962,6 +962,25 @@ func GetHPathByPath(boxID, p string) (hPath string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetHPathsByPaths(paths []string) (hPaths []string, err error) {
|
||||
pathsBoxes := getBoxesByPaths(paths)
|
||||
for p, box := range pathsBoxes {
|
||||
if nil == box {
|
||||
logging.LogWarnf("box not found by path [%s]", p)
|
||||
continue
|
||||
}
|
||||
|
||||
bt := treenode.GetBlockTreeByPath(p)
|
||||
if nil == bt {
|
||||
logging.LogWarnf("block tree not found by path [%s]", p)
|
||||
continue
|
||||
}
|
||||
|
||||
hPaths = append(hPaths, box.Name+bt.HPath)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetHPathByID(id string) (hPath string, err error) {
|
||||
tree, err := loadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue