0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

Insert shapes alwais on top (#10)

This commit is contained in:
Jesús Espino 2016-04-11 21:01:41 +02:00 committed by Andrey Antukh
parent 20ae512143
commit 706bc84d95

View file

@ -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'