Skip to content

Commit

Permalink
Made sure that removed events for grouped objects are fired when grou…
Browse files Browse the repository at this point in the history
…p is removed
  • Loading branch information
wferris722 committed Dec 19, 2017
1 parent 982603d commit 410f457
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/shapes/group.class.js
Expand Up @@ -100,8 +100,19 @@
}

this.setCoords();
this.on('removed', this._objectCleanup);
},

/**
* @private
*/
_objectCleanup: function(){
while(this._objects.length){
this.remove(this._objects[0]);
}
},


/**
* @private
* @param {Boolean} [skipCoordsChange] if true, coordinates of objects enclosed in a group do not change
Expand Down

0 comments on commit 410f457

Please sign in to comment.