🐛 Fix positioning on group and ungroup.

This commit is contained in:
Andrey Antukh 2020-06-12 11:58:49 +02:00 committed by Andrés Moya
parent 9ed6d23041
commit 861150ff46
2 changed files with 22 additions and 9 deletions

View file

@ -60,6 +60,13 @@
(or (not= (:type shape) :frame)
(= parent-id uuid/zero))))
(defn position-on-parent
[id objects]
(let [obj (get objects id)
pid (:parent-id obj)
prt (get objects pid)]
(d/index-of (:shapes prt) id)))
(defn insert-at-index
[shapes index ids]
(let [[before after] (split-at index shapes)