mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Minor minification
This commit is contained in:
parent
0050984d83
commit
9c1c00c11e
4 changed files with 17 additions and 14 deletions
|
@ -112,10 +112,10 @@ var Group = Item.extend(/** @lends Group# */{
|
||||||
// looked for yet).
|
// looked for yet).
|
||||||
if (clipItem === undefined) {
|
if (clipItem === undefined) {
|
||||||
clipItem = null;
|
clipItem = null;
|
||||||
for (var i = 0, l = this._children.length; i < l; i++) {
|
var children = this._children;
|
||||||
var child = this._children[i];
|
for (var i = 0, l = children.length; i < l; i++) {
|
||||||
if (child._clipMask) {
|
if (children[i]._clipMask) {
|
||||||
clipItem = child;
|
clipItem = children[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,8 +187,9 @@ var Group = Item.extend(/** @lends Group# */{
|
||||||
clipItem.draw(ctx, param.extend({ clip: true }));
|
clipItem.draw(ctx, param.extend({ clip: true }));
|
||||||
}
|
}
|
||||||
if (draw) {
|
if (draw) {
|
||||||
for (var i = 0, l = this._children.length; i < l; i++) {
|
var children = this._children;
|
||||||
var item = this._children[i];
|
for (var i = 0, l = children.length; i < l; i++) {
|
||||||
|
var item = children[i];
|
||||||
if (item !== clipItem)
|
if (item !== clipItem)
|
||||||
item.draw(ctx, param);
|
item.draw(ctx, param);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1596,9 +1596,10 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
_contains: function(point) {
|
_contains: function(point) {
|
||||||
if (this._children) {
|
var children = this._children;
|
||||||
for (var i = this._children.length - 1; i >= 0; i--) {
|
if (children) {
|
||||||
if (this._children[i].contains(point))
|
for (var i = children.length - 1; i >= 0; i--) {
|
||||||
|
if (children[i].contains(point))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -136,8 +136,9 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
smooth: function() {
|
smooth: function() {
|
||||||
for (var i = 0, l = this._children.length; i < l; i++)
|
var children = this._children;
|
||||||
this._children[i].smooth();
|
for (var i = 0, l = children.length; i < l; i++)
|
||||||
|
children[i].smooth();
|
||||||
},
|
},
|
||||||
|
|
||||||
// DOCS: reduce()
|
// DOCS: reduce()
|
||||||
|
|
|
@ -367,9 +367,9 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
_transformContent: function(matrix) {
|
_transformContent: function(matrix) {
|
||||||
var coords = new Array(6);
|
var coords = new Array(6), segments = this._segments;
|
||||||
for (var i = 0, l = this._segments.length; i < l; i++)
|
for (var i = 0, l = segments.length; i < l; i++)
|
||||||
this._segments[i]._transformCoordinates(matrix, coords, true);
|
segments[i]._transformCoordinates(matrix, coords, true);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue