refactor: selection state

This commit is contained in:
Weihua Lu
2021-04-16 11:49:03 +08:00
parent c7efda6c62
commit d05c540c15
3 changed files with 12 additions and 8 deletions

View File

@@ -549,6 +549,11 @@
[]
(:selection/mode @state))
(defn selection?
"True sense of selection mode with valid selected block"
[]
(and (in-selection-mode?) (seq (get-selection-blocks))))
(defn conj-selection-block!
[block direction]
(dom/add-class! block "selected noselect")