🐛 Respect group name when adding layout

This commit is contained in:
Alejandro Alonso 2024-01-02 09:14:45 +01:00 committed by Alonso Torres
parent f5b4ea975e
commit 8e3a73d0bd
2 changed files with 4 additions and 2 deletions

View file

@ -167,7 +167,7 @@
group-index (cfh/get-index-replacement selected objects)]
(rx/of
(dwse/select-shapes ordered-ids)
(dws/create-artboard-from-selection new-shape-id parent-id group-index)
(dws/create-artboard-from-selection new-shape-id parent-id group-index (:name (first selected-shapes)))
(cl/remove-all-fills [new-shape-id] {:color clr/black :opacity 1})
(create-layout-from-id new-shape-id type false)
(dwc/update-shapes [new-shape-id] #(assoc % :layout-item-h-sizing :auto :layout-item-v-sizing :auto))

View file

@ -333,6 +333,8 @@
([id parent-id]
(create-artboard-from-selection id parent-id nil))
([id parent-id index]
(create-artboard-from-selection id parent-id index nil))
([id parent-id index name]
(ptk/reify ::create-artboard-from-selection
ptk/WatchEvent
(watch [it state _]
@ -351,7 +353,7 @@
objects
selected
index
nil
name
false)
undo-id (js/Symbol)]