mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 21:37:20 +02:00
🐛 Respect group name when adding layout
This commit is contained in:
parent
f5b4ea975e
commit
8e3a73d0bd
2 changed files with 4 additions and 2 deletions
|
@ -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))
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue