diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2024-06-18 11:01:45 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2024-06-18 11:01:45 +0200 |
commit | a1c23d3838f6551f01894be40c8894398467c541 (patch) | |
tree | deb1ff485284dd0040dc50aec4f8df2c129bc22c /src/types/SVGNumber.js | |
parent | 3b47e461f0773e619619f1bc838234fdd9920d90 (diff) | |
download | svg.js-a1c23d3838f6551f01894be40c8894398467c541.tar.gz svg.js-a1c23d3838f6551f01894be40c8894398467c541.zip |
update dependencies
Diffstat (limited to 'src/types/SVGNumber.js')
-rw-r--r-- | src/types/SVGNumber.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/types/SVGNumber.js b/src/types/SVGNumber.js index 5945341..2770f67 100644 --- a/src/types/SVGNumber.js +++ b/src/types/SVGNumber.js @@ -31,10 +31,10 @@ export default class SVGNumber { this.value = isNaN(value) ? 0 : !isFinite(value) - ? value < 0 - ? -3.4e38 - : +3.4e38 - : value + ? value < 0 + ? -3.4e38 + : +3.4e38 + : value } else if (typeof value === 'string') { unit = value.match(numberAndUnit) @@ -93,8 +93,8 @@ export default class SVGNumber { (this.unit === '%' ? ~~(this.value * 1e8) / 1e6 : this.unit === 's' - ? this.value / 1e3 - : this.value) + this.unit + ? this.value / 1e3 + : this.value) + this.unit ) } |