0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -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) (mf/deps objects)
(fn [] (frame-wrapper-factory objects)))] (fn [] (frame-wrapper-factory objects)))]
[:> "symbol" #js {:id (str (:id component)) (when root-shape
:viewBox vbox [:> "symbol" #js {:id (str (:id component))
"penpot:path" path :viewBox vbox
"penpot:main-instance-id" main-instance-id "penpot:path" path
"penpot:main-instance-page" main-instance-page "penpot:main-instance-id" main-instance-id
"penpot:main-instance-x" main-instance-x "penpot:main-instance-page" main-instance-page
"penpot:main-instance-y" main-instance-y} "penpot:main-instance-x" main-instance-x
[:title name] "penpot:main-instance-y" main-instance-y}
[:> shape-container {:shape root-shape} [:title name]
(case (:type root-shape) [:> shape-container {:shape root-shape}
:group [:& group-wrapper {:shape root-shape :view-box vbox}] (case (:type root-shape)
:frame [:& frame-wrapper {:shape root-shape :view-box vbox}])]])) :group [:& group-wrapper {:shape root-shape :view-box vbox}]
:frame [:& frame-wrapper {:shape root-shape :view-box vbox}])]])))
(mf/defc components-svg (mf/defc components-svg
{::mf/wrap-props false} {::mf/wrap-props false}

View file

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

View file

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