now removing color key from shapes hash when a shape is removed from the stage

This commit is contained in:
Eric Rowell
2012-08-26 18:25:51 -07:00
parent 89611aed5f
commit c01c08d557
7 changed files with 64 additions and 48 deletions

View File

@@ -170,6 +170,21 @@ Kinetic.Layer.prototype = {
}
return canvas.toDataURL(mimeType, quality);
},
/**
* remove layer from stage
*/
_remove: function() {
/*
* remove canvas DOM from the document if
* it exists
*/
try {
this.getStage().content.removeChild(this.canvas.element);
}
catch(e) {
Kinetic.Global.warn('unable to remove layer scene canvas element from the document');
}
},
__draw: function(canvas) {
if(this.attrs.clearBeforeDraw) {
canvas.clear();