mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
Fixed #635
Added `destroy` method to the image node which deletes the reference to the DOM or canvas objects.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user