feat(outliner): add insert-node api

pull/1656/head
defclass 2021-03-18 18:01:02 +08:00
parent 218746edcd
commit 4ea2053510
1 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,12 @@
(-save new-right-node))
(-save node))))
(defn insert-node
[new-node target-node sibling?]
(if sibling?
(insert-node-as-sibling new-node target-node)
(insert-node-as-first-child new-node target-node)))
(defn delete-node
"Delete node from the tree."
[node]