mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 12:46:10 +02:00
🐛 Remove fill from group heads when migrating to v2
This commit is contained in:
parent
02ea0374a3
commit
3127a020a0
1 changed files with 5 additions and 4 deletions
|
@ -872,10 +872,11 @@
|
||||||
|
|
||||||
(fix-shape [shape]
|
(fix-shape [shape]
|
||||||
(if (or (nil? (:parent-id shape)) (ctk/instance-head? shape))
|
(if (or (nil? (:parent-id shape)) (ctk/instance-head? shape))
|
||||||
(let [frame? (= :frame (:type shape))]
|
(let [frame? (= :frame (:type shape))
|
||||||
(assoc shape
|
not-group? (not= :group (:type shape))]
|
||||||
:type :frame ; Old groups must be converted
|
(assoc shape ; Old groups must be converted
|
||||||
:fills (or (:fills shape) []) ; to frames and conform to spec
|
:type :frame ; to frames and conform to spec
|
||||||
|
:fills (if not-group? (d/nilv (:fills shape) []) []) ; Groups never should have fill
|
||||||
:shapes (or (:shapes shape) [])
|
:shapes (or (:shapes shape) [])
|
||||||
:hide-in-viewer (if frame? (boolean (:hide-in-viewer shape)) true)
|
:hide-in-viewer (if frame? (boolean (:hide-in-viewer shape)) true)
|
||||||
:show-content (if frame? (boolean (:show-content shape)) true)
|
:show-content (if frame? (boolean (:show-content shape)) true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue