mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
now removing color key from shapes hash when a shape is removed from the stage
This commit is contained in:
15
src/Layer.js
15
src/Layer.js
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user