Handle exportSVG({ precision: 0 }) correctly

This commit is contained in:
Johan Sundström 2015-10-27 15:33:09 -07:00
parent f1257d83b2
commit 1b129feebf
2 changed files with 10 additions and 1 deletions
src/util

View file

@ -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);
},