🐛 Fix mixed values displays for measurements in the design tab

This commit is contained in:
Belén Albeza 2024-02-08 10:03:31 +01:00 committed by Alonso Torres
parent d91b3d4fb6
commit acef775131
2 changed files with 7 additions and 7 deletions

View file

@ -53,7 +53,7 @@
;; This `value` represents the previous value and is used as ;; This `value` represents the previous value and is used as
;; initil value for the simple math expression evaluation. ;; initil value for the simple math expression evaluation.
value (d/parse-double value-str default) value (when (not= :multiple value-str) (d/parse-double value-str default))
;; We need to store the handle-blur ref so we can call it on unmount ;; We need to store the handle-blur ref so we can call it on unmount
dirty-ref (mf/use-ref false) dirty-ref (mf/use-ref false)

View file

@ -391,7 +391,7 @@
[:span {:class (stl/css :icon-text)} "W"] [:span {:class (stl/css :icon-text)} "W"]
[:> numeric-input* {:min 0.01 [:> numeric-input* {:min 0.01
:no-validate true :no-validate true
:placeholder "--" :placeholder (if (= :multiple (:width values)) (tr "settings.multiple") "--")
:on-change on-width-change :on-change on-width-change
:disabled disabled-width-sizing? :disabled disabled-width-sizing?
:className (stl/css :numeric-input) :className (stl/css :numeric-input)
@ -402,7 +402,7 @@
[:span {:class (stl/css :icon-text)} "H"] [:span {:class (stl/css :icon-text)} "H"]
[:> numeric-input* {:min 0.01 [:> numeric-input* {:min 0.01
:no-validate true :no-validate true
:placeholder "--" :placeholder (if (= :multiple (:height values)) (tr "settings.multiple") "--")
:on-change on-height-change :on-change on-height-change
:disabled disabled-height-sizing? :disabled disabled-height-sizing?
:className (stl/css :numeric-input) :className (stl/css :numeric-input)
@ -422,7 +422,7 @@
:title (tr "workspace.options.x")} :title (tr "workspace.options.x")}
[:span {:class (stl/css :icon-text)} "X"] [:span {:class (stl/css :icon-text)} "X"]
[:> numeric-input* {:no-validate true [:> numeric-input* {:no-validate true
:placeholder "--" :placeholder (if (= :multiple (:x values)) (tr "settings.multiple") "--")
:on-change on-pos-x-change :on-change on-pos-x-change
:disabled disabled-position-x? :disabled disabled-position-x?
:className (stl/css :numeric-input) :className (stl/css :numeric-input)
@ -433,7 +433,7 @@
:title (tr "workspace.options.y")} :title (tr "workspace.options.y")}
[:span {:class (stl/css :icon-text)} "Y"] [:span {:class (stl/css :icon-text)} "Y"]
[:> numeric-input* {:no-validate true [:> numeric-input* {:no-validate true
:placeholder "--" :placeholder (if (= :multiple (:y values)) (tr "settings.multiple") "--")
:disabled disabled-position-y? :disabled disabled-position-y?
:on-change on-pos-y-change :on-change on-pos-y-change
:className (stl/css :numeric-input) :className (stl/css :numeric-input)
@ -450,7 +450,7 @@
:min 0 :min 0
:max 359 :max 359
:data-wrap true :data-wrap true
:placeholder "--" :placeholder (if (= :multiple (:rotation values)) (tr "settings.multiple") "--")
:on-change on-rotation-change :on-change on-rotation-change
:className (stl/css :numeric-input) :className (stl/css :numeric-input)
:value (:rotation values)}]]) :value (:rotation values)}]])
@ -464,7 +464,7 @@
:title (tr "workspace.options.radius")} :title (tr "workspace.options.radius")}
[:span {:class (stl/css :icon)} i/corner-radius-refactor] [:span {:class (stl/css :icon)} i/corner-radius-refactor]
[:> numeric-input* [:> numeric-input*
{:placeholder "Mixed" {:placeholder (if (= :multiple (:rx values)) (tr "settings.multiple") "--")
:ref radius-input-ref :ref radius-input-ref
:min 0 :min 0
:on-change on-radius-1-change :on-change on-radius-1-change