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:
parent
d95d79a7c2
commit
f4d513b622
3 changed files with 20 additions and 13 deletions
|
@ -509,6 +509,7 @@
|
||||||
(mf/deps objects)
|
(mf/deps objects)
|
||||||
(fn [] (frame-wrapper-factory objects)))]
|
(fn [] (frame-wrapper-factory objects)))]
|
||||||
|
|
||||||
|
(when root-shape
|
||||||
[:> "symbol" #js {:id (str (:id component))
|
[:> "symbol" #js {:id (str (:id component))
|
||||||
:viewBox vbox
|
:viewBox vbox
|
||||||
"penpot:path" path
|
"penpot:path" path
|
||||||
|
@ -520,7 +521,7 @@
|
||||||
[:> shape-container {:shape root-shape}
|
[:> shape-container {:shape root-shape}
|
||||||
(case (:type root-shape)
|
(case (:type root-shape)
|
||||||
:group [:& group-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}])]]))
|
: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}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue