0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

Fix wrong stata querying on shape moviment streams.

This commit is contained in:
Andrey Antukh 2016-01-22 19:38:14 +02:00
parent 6ee5d08086
commit 84d87dcc4f

View file

@ -106,9 +106,11 @@
(rx/on-value $ (fn [delta]
(let [pageid (get-in @st/state [:workspace :page])
selected (get-in @st/state [:workspace :selected])
page (get-in @st/state [:pages-by-id pageid])]
(doseq [sid (filter selected (:shapes page))]
(rs/emit! (dw/move-shape sid delta))))))))
shapes (->> (vals @shapes-by-id)
(filter #(= (:page %) pageid))
(filter (comp selected :id)))]
(doseq [{:keys [id group]} shapes]
(rs/emit! (dw/move-shape id delta))))))))
(defn selrect->rect
[data]