Added `destroy` method to the image node which deletes the reference
to the DOM or canvas objects.
This commit is contained in:
ippo615
2013-10-13 15:06:15 -04:00
parent 1dbbf3d301
commit 0b4a107166

View File

@@ -231,6 +231,12 @@
getHeight: function() {
var image = this.getImage();
return this.attrs.height || (image ? image.height : 0);
},
destroy: function(){
Kinetic.Shape.prototype.destroy.call(this);
delete this.filterCanvas;
delete this.attrs;
return this;
}
};
Kinetic.Util.extend(Kinetic.Image, Kinetic.Shape);