Align stage multi-selection modifiers with the timeline
This commit is contained in:
parent
9bc406f413
commit
6de71c4c66
3 changed files with 38 additions and 6 deletions
|
|
@ -484,3 +484,18 @@
|
|||
(is (= [:girl clip-id] path))
|
||||
(is (some? (get-in saved [:symbols :main :nodes clip-id]))
|
||||
"and that is where the node actually is")))
|
||||
|
||||
(deftest restacking-a-selection-keeps-all-members-selected
|
||||
(let [doc (update-in (fixture/document) [:symbols :main] dissoc :display)
|
||||
id (store/install! {:clip doc :store {}} "restack-many-test")
|
||||
selections [[:node :main :a [:a]] [:node :main :b [:b]]]]
|
||||
(reset! rf-db/app-db {:clip/current id :paint/revision 0
|
||||
:ui {:open :main :selection (peek selections) :selections selections}
|
||||
:playback {:frame 6}})
|
||||
(rf/dispatch-sync [::ui/restack-nodes selections [:insert] true])
|
||||
(let [after (:clip (store/entry (:clip/current @rf-db/app-db)))
|
||||
z #(get-in after [:symbols :main :nodes % :z])]
|
||||
(is (pos? (compare (z :a) (z :insert))))
|
||||
(is (pos? (compare (z :b) (z :a))))
|
||||
(is (= selections (get-in @rf-db/app-db [:ui :selections])))
|
||||
(is (= [0 4] (mapv #(get-in after [:symbols :main :nodes % :time :at]) [:a :b]))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue