Skip to content

Commit

Permalink
Remove reference to lastRenderedWithControls when that object is dele…
Browse files Browse the repository at this point in the history
…ted (#3023)
  • Loading branch information
Scott Seaward authored and asturur committed Jun 2, 2016
1 parent b52ca6f commit da42b29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/canvas.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,17 @@
this._objects[i]._renderControls(ctx);
this.lastRenderedWithControls = this._objects[i];
}
},

/**
* @private
* @param {fabric.Object} obj Object that was removed
*/
_onObjectRemoved: function(obj) {
if (obj === this.lastRenderedWithControls) {
delete this.lastRenderedWithControls;
}
this.callSuper('_onObjectRemoved', obj);
}
});

Expand Down

0 comments on commit da42b29

Please sign in to comment.