mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
enhance: only sort selection blocks when mouse up
This commit is contained in:
@@ -551,11 +551,18 @@
|
||||
(set-selection-blocks! blocks :down))
|
||||
([blocks direction]
|
||||
(when (seq blocks)
|
||||
(let [blocks (util/sort-by-height blocks)]
|
||||
(swap! state assoc
|
||||
:selection/mode true
|
||||
:selection/blocks blocks
|
||||
:selection/direction direction)))))
|
||||
(swap! state assoc
|
||||
:selection/mode true
|
||||
:selection/blocks blocks
|
||||
:selection/direction direction))))
|
||||
|
||||
(defn sort-selection-blocks!
|
||||
[]
|
||||
(when (:selection/mode @state)
|
||||
(swap! state update :selection/blocks
|
||||
(fn [blocks]
|
||||
(when (seq blocks)
|
||||
(util/sort-by-height blocks))))))
|
||||
|
||||
(defn into-selection-mode!
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user