From a0b903e49c0c2a7b3436419bcdff20f7bb450d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 6 Apr 2013 18:39:17 +0200 Subject: [PATCH] Simply call slice() instead of slice(0). --- src/basic/Matrix.js | 2 +- src/path/Curve.js | 2 +- src/path/Path.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index c80a19dc..06656a24 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -425,7 +425,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{ _transformBounds: function(bounds, dest, dontNotify) { var coords = this._transformCorners(bounds), min = coords.slice(0, 2), - max = coords.slice(0); + max = coords.slice(); for (var i = 2; i < 8; i++) { var val = coords[i], j = i & 1; diff --git a/src/path/Curve.js b/src/path/Curve.js index 7454a508..0fcd9b63 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -579,7 +579,7 @@ statics: { getBounds: function(v) { var min = v.slice(0, 2), // Start with values of point1 - max = min.slice(0), // clone + max = min.slice(), // clone roots = new Array(2); for (var i = 0; i < 2; i++) Curve._addBounds(v[i], v[i + 2], v[i + 4], v[i + 6], diff --git a/src/path/Path.js b/src/path/Path.js index 542ce1f4..04e86cf6 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1239,7 +1239,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ // Prepend all segments from path except the last one this._add(segments.slice(0, segments.length - 1), 0); } else { - this._add(segments.slice(0)); + this._add(segments.slice()); } } path.remove(); @@ -2241,7 +2241,7 @@ statics: { // Make coordinates for first segment available in prevCoords. prevCoords = first._transformCoordinates(matrix, new Array(6), false), min = prevCoords.slice(0, 2), // Start with values of first point - max = min.slice(0), // clone + max = min.slice(), // clone roots = new Array(2); function processSegment(segment) {