Switch to using Base.isArray.

This commit is contained in:
Jürg Lehni 2011-03-04 21:47:00 +00:00
parent 8a61599c7d
commit 7355c2d4a7
5 changed files with 5 additions and 5 deletions

View file

@ -42,7 +42,7 @@ var Matrix = this.Matrix = Base.extend({
var mx = arguments[0];
if (mx instanceof Matrix) {
this.set(mx._m00, mx._m10, mx._m01, mx._m11, mx._m02, mx._m12);
} else if (Array.isArray(mx)) {
} else if (Base.isArray(mx)) {
this.set.apply(this, mx);
} else {
ok = false;

View file

@ -20,7 +20,7 @@ var Point = this.Point = Base.extend({
} else if (arg.width !== undefined) {
this.x = arg.width;
this.y = arg.height;
} else if (Array.isArray(arg)) {
} else if (Base.isArray(arg)) {
this.x = arg[0];
this.y = arg.length > 1 ? arg[1] : arg[0];
} else if (typeof arg === 'number') {

View file

@ -13,7 +13,7 @@ var Size = this.Size = Base.extend({
} else if (arg.x !== undefined) {
this.width = arg.x;
this.height = arg.y;
} else if (Array.isArray(arg)) {
} else if (Base.isArray(arg)) {
this.width = arg[0];
this.height = arg.length > 1 ? arg[1] : arg[0];
} else if (typeof arg === 'number') {

View file

@ -85,7 +85,7 @@ var RGBColor = this.RGBColor = Color.extend(new function() {
this._green = components[1];
this._blue = components[2];
this.alpha = -1;
} else if (Array.isArray(arg)) {
} else if (Base.isArray(arg)) {
this._red = arg[0];
this._green = arg[1];
this._blue = arg[2];

View file

@ -9,7 +9,7 @@ var Path = this.Path = PathItem.extend({
// If it is an array, it can also be a description of a point, so
// check its first entry for object as well
var segments = arguments[0];
if (!segments || !Array.isArray(segments)
if (!segments || !Base.isArray(segments)
|| typeof segments[0] != 'object')
segments = arguments;
for (var i = 0, l = segments.length; i < l; i++) {