diff --git a/src/color/Color.js b/src/color/Color.js index 0eff35f7..14cd695b 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -84,7 +84,7 @@ var Color = this.Color = Base.extend(new function() { function hexToRgb(string) { var hex = string.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); if (hex.length >= 4) { - var components = new Array(3); + var components = [0, 0, 0]; for (var i = 0; i < 3; i++) { var value = hex[i + 1]; components[i] = parseInt(value.length == 1 diff --git a/src/item/Raster.js b/src/item/Raster.js index bfcded61..dfee61cd 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -444,7 +444,7 @@ var Raster = this.Raster = PlacedItem.extend(/** @lends Raster# */{ getPixel: function(point) { point = Point.read(arguments); var pixels = this.getContext().getImageData(point.x, point.y, 1, 1).data, - components = new Array(4); + components = [0, 0, 0, 0]; for (var i = 0; i < 4; i++) components[i] = pixels[i] / 255; return Color.create('rgb', components); diff --git a/src/path/Curve.js b/src/path/Curve.js index 0fcd9b63..33959972 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -580,7 +580,7 @@ statics: { getBounds: function(v) { var min = v.slice(0, 2), // Start with values of point1 max = min.slice(), // clone - roots = new Array(2); + roots = [0, 0]; for (var i = 0; i < 2; i++) Curve._addBounds(v[i], v[i + 2], v[i + 4], v[i + 6], i, 0, min, max, roots);