mirror of
https://github.com/penpot/penpot.git
synced 2025-03-28 15:41:25 -05:00
🐛 Fix incorrect assumption about parseFloat on fixing percent
on parsing and normalizing svg elements
This commit is contained in:
parent
9b59b92464
commit
f9d63dba00
1 changed files with 1 additions and 2 deletions
|
@ -964,8 +964,7 @@
|
|||
is-other? #{:r :stroke-width}]
|
||||
|
||||
(if is-percent?
|
||||
;; JS parseFloat removes the % symbol
|
||||
(let [attr-num (d/parse-double attr-val)]
|
||||
(let [attr-num (d/parse-double (str/rtrim attr-val "%"))]
|
||||
(str (cond
|
||||
(is-x? attr-key) (fix-coord :x :width attr-num)
|
||||
(is-y? attr-key) (fix-coord :y :height attr-num)
|
||||
|
|
Loading…
Add table
Reference in a new issue