mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 16:18:11 -05:00
🐛 Remove a decimal sets value to 0
This commit is contained in:
parent
3bae4839bd
commit
14ed83fb31
2 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
- Add the ability to disable standard, password login [Taiga #2999](https://tree.taiga.io/project/penpot/us/2999)
|
- Add the ability to disable standard, password login [Taiga #2999](https://tree.taiga.io/project/penpot/us/2999)
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :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)
|
- 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)
|
- 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)
|
- Fix ellipsis in long page names [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
[app.util.keyboard :as kbd]
|
[app.util.keyboard :as kbd]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
[app.util.simple-math :as sm]
|
[app.util.simple-math :as sm]
|
||||||
|
[cuerdas.core :as str]
|
||||||
[goog.events :as events]
|
[goog.events :as events]
|
||||||
[rumext.alpha :as mf])
|
[rumext.alpha :as mf])
|
||||||
(:import goog.events.EventType))
|
(:import goog.events.EventType))
|
||||||
|
@ -75,7 +76,11 @@
|
||||||
(mf/deps ref min-val max-val value nillable default-val)
|
(mf/deps ref min-val max-val value nillable default-val)
|
||||||
(fn []
|
(fn []
|
||||||
(let [input-node (mf/ref-val ref)
|
(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)
|
new-value (-> (dom/get-value input-node)
|
||||||
|
(drop-ending-point)
|
||||||
(sm/expr-eval value))]
|
(sm/expr-eval value))]
|
||||||
(cond
|
(cond
|
||||||
(d/num? new-value)
|
(d/num? new-value)
|
||||||
|
|
Loading…
Add table
Reference in a new issue