Rearrange Base.read argument sequence.

options are used more often than length.
This commit is contained in:
Jürg Lehni 2014-01-05 18:31:24 +01:00
parent cd6bfa0b77
commit 706fe2c77d
6 changed files with 20 additions and 21 deletions
src/basic

View file

@ -197,7 +197,7 @@ var Matrix = Base.extend(/** @lends Matrix# */{
// Do not modify scale, center, since that would arguments of which
// we're reading from!
var scale = Point.read(arguments),
center = Point.read(arguments, 0, 0, { readNull: true });
center = Point.read(arguments, 0, { readNull: true });
if (center)
this.translate(center);
this._a *= scale.x;
@ -278,7 +278,7 @@ var Matrix = Base.extend(/** @lends Matrix# */{
// Do not modify point, center, since that would arguments of which
// we're reading from!
var shear = Point.read(arguments),
center = Point.read(arguments, 0, 0, { readNull: true });
center = Point.read(arguments, 0, { readNull: true });
if (center)
this.translate(center);
var a = this._a,
@ -314,7 +314,7 @@ var Matrix = Base.extend(/** @lends Matrix# */{
*/
skew: function(/* skew, center */) {
var skew = Point.read(arguments),
center = Point.read(arguments, 0, 0, { readNull: true }),
center = Point.read(arguments, 0, { readNull: true }),
toRadians = Math.PI / 180,
shear = new Point(Math.tan(skew.x * toRadians),
Math.tan(skew.y * toRadians));