mirror of
https://github.com/penpot/penpot.git
synced 2025-07-29 14:29:18 +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)]
|
group-index (cfh/get-index-replacement selected objects)]
|
||||||
(rx/of
|
(rx/of
|
||||||
(dwse/select-shapes ordered-ids)
|
(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})
|
(cl/remove-all-fills [new-shape-id] {:color clr/black :opacity 1})
|
||||||
(create-layout-from-id new-shape-id type false)
|
(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))
|
(dwc/update-shapes [new-shape-id] #(assoc % :layout-item-h-sizing :auto :layout-item-v-sizing :auto))
|
||||||
|
|
|
@ -333,6 +333,8 @@
|
||||||
([id parent-id]
|
([id parent-id]
|
||||||
(create-artboard-from-selection id parent-id nil))
|
(create-artboard-from-selection id parent-id nil))
|
||||||
([id parent-id index]
|
([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/reify ::create-artboard-from-selection
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [it state _]
|
(watch [it state _]
|
||||||
|
@ -351,7 +353,7 @@
|
||||||
objects
|
objects
|
||||||
selected
|
selected
|
||||||
index
|
index
|
||||||
nil
|
name
|
||||||
false)
|
false)
|
||||||
|
|
||||||
undo-id (js/Symbol)]
|
undo-id (js/Symbol)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue