mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 17:41:39 +02:00
🐛 Fix problem with constraints when creating group
This commit is contained in:
parent
d01eccf912
commit
3a80120bf6
2 changed files with 9 additions and 0 deletions
|
@ -120,6 +120,14 @@
|
|||
(pcb/with-page-id page-id)
|
||||
(pcb/with-objects objects)
|
||||
(pcb/add-object group {:index group-idx})
|
||||
|
||||
;; Create a group needs to reset the constraints to scale/scale
|
||||
(pcb/update-shapes
|
||||
(map :id shapes)
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(d/assoc-when :constraints-h :scale)
|
||||
(d/assoc-when :constraints-v :scale))))
|
||||
(pcb/update-shapes (map :id shapes) ctl/remove-layout-item-data)
|
||||
(pcb/change-parent (:id group) (reverse shapes))
|
||||
(pcb/update-shapes (map :id shapes-to-detach) ctk/detach-shape)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue