From 84d87dcc4f88caf4f6e1324ac2683e06473d58d9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 22 Jan 2016 19:38:14 +0200 Subject: [PATCH] Fix wrong stata querying on shape moviment streams. --- src/uxbox/ui/workspace/base.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/uxbox/ui/workspace/base.cljs b/src/uxbox/ui/workspace/base.cljs index 097b5347f..67e9f204d 100644 --- a/src/uxbox/ui/workspace/base.cljs +++ b/src/uxbox/ui/workspace/base.cljs @@ -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]