From 706bc84d954625018687c792d90ab848c8abb51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 11 Apr 2016 21:01:41 +0200 Subject: [PATCH] Insert shapes alwais on top (#10) --- src/uxbox/state/shapes.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uxbox/state/shapes.cljs b/src/uxbox/state/shapes.cljs index 6e6a944b2..fc8401371 100644 --- a/src/uxbox/state/shapes.cljs +++ b/src/uxbox/state/shapes.cljs @@ -10,7 +10,7 @@ (let [sid (random-uuid) shape (merge shape {:id sid :page page})] (as-> state $ - (update-in $ [:pages-by-id page :shapes] conj sid) + (update-in $ [:pages-by-id page :shapes] #(into [] (cons sid %))) (assoc-in $ [:shapes-by-id sid] shape)))) (defn duplicate-shapes'