mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Use the code from Group#isEmpty() and CompoundPath#isEmpty() for Item#isEmpty(), since any item that does not have children overrides it.
This commit is contained in:
parent
eebcbda9d3
commit
d3ccec2256
3 changed files with 1 additions and 9 deletions
|
@ -116,10 +116,6 @@ var Group = this.Group = Item.extend(/** @lends Group# */{
|
|||
return this;
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return this._children.length == 0;
|
||||
},
|
||||
|
||||
draw: function(ctx, param) {
|
||||
var clipItem = this._getClipItem();
|
||||
if (clipItem) {
|
||||
|
|
|
@ -638,7 +638,7 @@ var Item = this.Item = Base.extend(Callback, {
|
|||
* @type Boolean
|
||||
*/
|
||||
isEmpty: function() {
|
||||
return true;
|
||||
return this._children.length == 0;
|
||||
}
|
||||
}, Base.each(['getBounds', 'getStrokeBounds', 'getHandleBounds', 'getRoughBounds'],
|
||||
function(name) {
|
||||
|
|
|
@ -96,10 +96,6 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
|||
return curves;
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return this._children.length == 0;
|
||||
},
|
||||
|
||||
contains: function(point) {
|
||||
point = Point.read(arguments);
|
||||
var count = 0;
|
||||
|
|
Loading…
Reference in a new issue