mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-04 00:40:29 -04:00
Handle exportSVG({ precision: 0 }) correctly
This commit is contained in:
parent
f1257d83b2
commit
1b129feebf
2 changed files with 10 additions and 1 deletions
src/util
|
@ -20,7 +20,7 @@ var Formatter = Base.extend(/** @lends Formatter# */{
|
|||
* @param {Number} [precision=5] the amount of fractional digits
|
||||
*/
|
||||
initialize: function(precision) {
|
||||
this.precision = precision || 5;
|
||||
this.precision = precision == null ? 5 : precision;
|
||||
this.multiplier = Math.pow(10, this.precision);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue