mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 18:18:24 -05:00
🐛 Fix migrating old components should not clip the content
This commit is contained in:
parent
d5b2a91bce
commit
3bc6d2b0a7
1 changed files with 11 additions and 8 deletions
|
@ -806,7 +806,8 @@
|
|||
:width (:width (:selrect root-shape))
|
||||
:height (:height (:selrect root-shape))
|
||||
:name (:name component)
|
||||
:shapes [new-id]})
|
||||
:shapes [new-id]
|
||||
:show-content true})
|
||||
(assoc :frame-id nil
|
||||
:parent-id nil))
|
||||
root-shape' (assoc root-shape
|
||||
|
@ -846,13 +847,15 @@
|
|||
|
||||
(fix-shape [shape]
|
||||
(if (or (nil? (:parent-id shape)) (ctk/instance-head? shape))
|
||||
(let [frame? (= :frame (:type shape))]
|
||||
(assoc shape
|
||||
:type :frame ; Old groups must be converted
|
||||
:fills (or (:fills shape) []) ; to frames and conform to spec
|
||||
:shapes (or (:shapes shape) [])
|
||||
:hide-in-viewer (or (: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)
|
||||
:rx (or (:rx shape) 0)
|
||||
:ry (or (:ry shape) 0))
|
||||
:ry (or (:ry shape) 0)))
|
||||
shape))]
|
||||
(-> file-data
|
||||
(update :pages-index update-vals fix-container)
|
||||
|
|
Loading…
Add table
Reference in a new issue