This commit is contained in:
alonso.torres
2026-02-26 17:30:27 +01:00
parent 2038d672eb
commit fb34830aa5
3 changed files with 10 additions and 3 deletions

View File

@@ -46,8 +46,9 @@
(mf/defc exports-menu*
{::mf/wrap [#(mf/memo' % check-exports-menu-props)]}
[{:keys [ids type shapes values file-id page-id]}]
[{:keys [ids type shapes values file-id page-id] :as props}]
(prn "??" props)
(let [exports (get values :exports [])
open* (mf/use-state true)
open? (deref open*)
@@ -86,6 +87,10 @@
(mf/deps ids page-id file-id exports)
(fn [event]
(dom/prevent-default event)
(.log js/console "???on-download" event)
(prn ">" type)
(if (= :multiple type)
;; I can select multiple shapes all of them with no export settings and one of them with only one
;; In that situation we must export it directly
@@ -115,7 +120,8 @@
:object-id (first ids)}
exports (mapv #(merge % defaults) exports)]
(st/emit!
(prn "??" exports)
#_(st/emit!
(de/request-export {:exports exports})
(de/export-shapes-event exports "workspace:sidebar"))))))

View File

@@ -161,7 +161,7 @@
[:& blur-menu {:ids ids
:values (select-keys shape [:blur])}]
[:& frame-grid {:shape shape}]
[:> exports-menu* {:type type
[:> exports-menu* {:type shape-type
:ids ids
:shapes shapes
:values (select-keys shape exports-attrs)

View File

@@ -1390,6 +1390,7 @@ impl RenderState {
clip_bounds: None,
visited_mask: false,
mask: false,
flattened: false
});
self.render_shape_tree_partial_uncached(tree, timestamp, false, true)?;
}