0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Remove a decimal sets value to 0

This commit is contained in:
Pablo Alba 2022-03-21 18:34:51 +01:00 committed by Alonso Torres
parent 3bae4839bd
commit 14ed83fb31
2 changed files with 6 additions and 0 deletions

View file

@ -25,6 +25,7 @@
- Add the ability to disable standard, password login [Taiga #2999](https://tree.taiga.io/project/penpot/us/2999)
### :bug: Bugs fixed
- Remove a decimal sets value to 0 [Taiga #3059](https://tree.taiga.io/project/penpot/issue/3054)
- Go to style library file to edit in a new tab [Taiga #2639](https://tree.taiga.io/project/penpot/issue/2639)
- Inner shadow with border not working properly [Taiga #2883](https://tree.taiga.io/project/penpot/issue/2883)
- Fix ellipsis in long page names [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962)

View file

@ -14,6 +14,7 @@
[app.util.keyboard :as kbd]
[app.util.object :as obj]
[app.util.simple-math :as sm]
[cuerdas.core :as str]
[goog.events :as events]
[rumext.alpha :as mf])
(:import goog.events.EventType))
@ -75,7 +76,11 @@
(mf/deps ref min-val max-val value nillable default-val)
(fn []
(let [input-node (mf/ref-val ref)
drop-ending-point #(if (str/ends-with? % ".")
(str/join "" (drop-last %))
%)
new-value (-> (dom/get-value input-node)
(drop-ending-point)
(sm/expr-eval value))]
(cond
(d/num? new-value)