0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 15:51:37 -05:00

Maintain correct order on group duplication

This commit is contained in:
Jesús Espino 2016-12-22 14:59:31 +01:00
parent a3fdb22342
commit 6a38675602

View file

@ -47,6 +47,7 @@
(update-in $ [:shapes group :items] #(into [] (cons id %)))
(assoc-in $ [:shapes id] shape)))]
(->> (map #(get-in state [:shapes %]) items)
(reverse)
(reduce #(duplicate-shape %1 %2 used-names page id) state)))
(let [id (uuid/random)
shape (-> (dissoc shape :group)