mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 14:01:38 +02:00
🐛 Fix copying layout values with only multiple decimals
This commit is contained in:
parent
1102bc9cba
commit
37fdf51eaf
2 changed files with 14 additions and 12 deletions
|
@ -8,6 +8,7 @@
|
|||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.text :as txt]
|
||||
[app.main.ui.formats :as fmt]
|
||||
[app.util.color :as uc]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
|
@ -108,7 +109,7 @@
|
|||
(every? #(or (nil? %) (= % 0)) value)
|
||||
(or (nil? value) (= value 0))))
|
||||
|
||||
default-format (fn [value] (str value "px"))
|
||||
default-format (fn [value] (str (fmt/format-pixels value)))
|
||||
format-property (fn [prop]
|
||||
(let [css-prop (or (prop to-prop) (name prop))
|
||||
format-fn (or (prop format) default-format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue