mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-29 07:09:45 -04:00
Refactor Format literal to Formatter class that keeps precision stored.
This commit is contained in:
parent
8da8f116d1
commit
fbe8a558bd
13 changed files with 116 additions and 107 deletions
src/basic
|
@ -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(', ') + ']]';
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue