mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Simply call slice() instead of slice(0).
This commit is contained in:
parent
4bc3882c82
commit
a0b903e49c
3 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue