From 927dbbfe82b33b8a49b834c89d53f266022e6a5a Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 25 Mar 2022 13:37:38 +0100 Subject: [PATCH] :bug: Fix precission on export modal --- frontend/src/app/main/ui/export.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/export.cljs b/frontend/src/app/main/ui/export.cljs index 1b2a02617e..f6c17187e8 100644 --- a/frontend/src/app/main/ui/export.cljs +++ b/frontend/src/app/main/ui/export.cljs @@ -18,6 +18,7 @@ [app.main.ui.workspace.shapes :refer [shape-wrapper]] [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr c]] + [app.util.strings :as ust] [cuerdas.core :as str] [rumext.alpha :as mf])) @@ -107,8 +108,8 @@ [:div.field.name (cond-> (:name shape) suffix (str suffix))] (when (:scale export) - [:div.field.scale (dm/str (* width (:scale export)) "x" - (* height (:scale export)) "px ")]) + [:div.field.scale (dm/str (ust/format-precision (* width (:scale export)) 2) "x" + (ust/format-precision (* height (:scale export)) 2) "px ")]) (when (:type export) [:div.field.extension (-> export :type d/name str/upper)])]))]