🐛 Fix export simple path

This commit is contained in:
Alejandro Alonso 2022-08-31 12:47:10 +02:00
parent 8314e6c17b
commit 8f98b81829
3 changed files with 11 additions and 4 deletions

View file

@ -7,6 +7,7 @@
(ns app.render
"The main entry point for UI part needed by the exporter."
(:require
[app.common.geom.shapes.bounds :as gsb]
[app.common.logging :as l]
[app.common.math :as mth]
[app.common.spec :as us]
@ -122,10 +123,11 @@
;; exportation process.
(mf/with-effect [object]
(when object
(dom/set-page-style!
{:size (str/concat
(mth/ceil (:width object)) "px "
(mth/ceil (:height object)) "px")})))
(let [{:keys [width height]} (gsb/get-object-bounds [objects] object)]
(dom/set-page-style!
{:size (str/concat
(mth/ceil width) "px "
(mth/ceil height) "px")}))))
(when objects
[:& render/object-svg