From 63e920828b64eec0ff6a7077145ee6a23e815a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 29 May 2023 12:48:50 +0200 Subject: [PATCH] :bug: Fix frame components lost fill when migrated to v2 --- common/src/app/common/types/file.cljc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/types/file.cljc b/common/src/app/common/types/file.cljc index 22d2a7bda..5c3a5d12a 100644 --- a/common/src/app/common/types/file.cljc +++ b/common/src/app/common/types/file.cljc @@ -333,6 +333,7 @@ (if (empty? components) (assoc-in file-data [:options :components-v2] true) (let [grid-gap 50 + [file-data page-id start-pos] (get-or-add-library-page file-data grid-gap) @@ -349,7 +350,6 @@ {:main-instance? true :force-frame-id uuid/zero :keep-ids? true}) - add-shapes (fn [page] (reduce (fn [page shape] @@ -394,9 +394,10 @@ root-to-board (fn [shape] (cond-> shape - (and (ctk/instance-root? shape) - (cph/frame-shape? shape)) - (assoc :fills [] + (and (ctk/instance-head? shape) + (not (cph/frame-shape? shape))) + (assoc :type :frame + :fills [] :hide-in-viewer true :rx 0 :ry 0)))