From 7355c2d4a778f36121408cfb46701a0e59a4512c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 4 Mar 2011 21:47:00 +0000 Subject: [PATCH] Switch to using Base.isArray. --- src/basic/Matrix.js | 2 +- src/basic/Point.js | 2 +- src/basic/Size.js | 2 +- src/color/RGBColor.js | 2 +- src/path/Path.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index cc9d5141..83806349 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -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; diff --git a/src/basic/Point.js b/src/basic/Point.js index 5d62a3fe..7959bad4 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -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') { diff --git a/src/basic/Size.js b/src/basic/Size.js index 8cb9238b..d185f953 100644 --- a/src/basic/Size.js +++ b/src/basic/Size.js @@ -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') { diff --git a/src/color/RGBColor.js b/src/color/RGBColor.js index 9ea85c86..240664f3 100644 --- a/src/color/RGBColor.js +++ b/src/color/RGBColor.js @@ -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]; diff --git a/src/path/Path.js b/src/path/Path.js index b91f1cec..e4d0092b 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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++) {