0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

🐛 Fix problem with import zip file

This commit is contained in:
alonso.torres 2024-02-21 17:37:18 +01:00 committed by Andrey Antukh
parent d95d79a7c2
commit f4d513b622
3 changed files with 20 additions and 13 deletions

View file

@ -509,18 +509,19 @@
(mf/deps objects)
(fn [] (frame-wrapper-factory objects)))]
[:> "symbol" #js {:id (str (:id component))
:viewBox vbox
"penpot:path" path
"penpot:main-instance-id" main-instance-id
"penpot:main-instance-page" main-instance-page
"penpot:main-instance-x" main-instance-x
"penpot:main-instance-y" main-instance-y}
[:title name]
[:> shape-container {:shape root-shape}
(case (:type root-shape)
:group [:& group-wrapper {:shape root-shape :view-box vbox}]
:frame [:& frame-wrapper {:shape root-shape :view-box vbox}])]]))
(when root-shape
[:> "symbol" #js {:id (str (:id component))
:viewBox vbox
"penpot:path" path
"penpot:main-instance-id" main-instance-id
"penpot:main-instance-page" main-instance-page
"penpot:main-instance-x" main-instance-x
"penpot:main-instance-y" main-instance-y}
[:title name]
[:> shape-container {:shape root-shape}
(case (:type root-shape)
:group [:& group-wrapper {:shape root-shape :view-box vbox}]
:frame [:& frame-wrapper {:shape root-shape :view-box vbox}])]])))
(mf/defc components-svg
{::mf/wrap-props false}

View file

@ -104,6 +104,9 @@
(-> (add! :show-content)
(add! :hide-in-viewer)))
(cond-> (and frame? (:use-for-thumbnail shape))
(add! :use-for-thumbnail))
(cond-> (and (or rect? image? frame?) (some? (:r1 shape)))
(-> (add! :r1)
(add! :r2)

View file

@ -820,10 +820,13 @@
(defn add-frame-data [props node]
(let [grids (parse-grids node)
show-content (get-meta node :show-content str->bool)
hide-in-viewer (get-meta node :hide-in-viewer str->bool)]
hide-in-viewer (get-meta node :hide-in-viewer str->bool)
use-for-thumbnail (get-meta node :use-for-thumbnail str->bool)]
(-> props
(assoc :show-content show-content)
(assoc :hide-in-viewer hide-in-viewer)
(cond-> use-for-thumbnail
(assoc :use-for-thumbnail use-for-thumbnail))
(cond-> (d/not-empty? grids)
(assoc :grids grids)))))