mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 11:48:32 +02:00
🐛 Fix positioning on group and ungroup.
This commit is contained in:
parent
9ed6d23041
commit
861150ff46
2 changed files with 22 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue