Refactor Format literal to Formatter class that keeps precision stored.

This commit is contained in:
Jürg Lehni 2013-04-09 17:32:19 -07:00
parent 8da8f116d1
commit fbe8a558bd
13 changed files with 116 additions and 107 deletions
src/basic

View file

@ -120,11 +120,11 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
* @return {String} A string representation of this transform.
*/
toString: function() {
var format = Format.number;
return '[[' + [format(this._a), format(this._b),
format(this._tx)].join(', ') + '], ['
+ [format(this._c), format(this._d),
format(this._ty)].join(', ') + ']]';
var f = Formatter.instance;
return '[[' + [f.number(this._a), f.number(this._b),
f.number(this._tx)].join(', ') + '], ['
+ [f.number(this._c), f.number(this._d),
f.number(this._ty)].join(', ') + ']]';
},
/**