mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 14:20:12 -04:00
Implement Item#isEmpty() for the various types.
And use it to tell #getBounds() when to ignore items.
This commit is contained in:
parent
adb2ddc615
commit
e17e94b50b
7 changed files with 29 additions and 1 deletions
src/path
|
@ -85,6 +85,10 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
|||
this._children[i].smooth();
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return this._children.length == 0;
|
||||
},
|
||||
|
||||
draw: function(ctx, param) {
|
||||
var children = this._children;
|
||||
// Return early if the compound path doesn't have any children:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue