Fix clone function to support custom Shapes. close #71

This commit is contained in:
Anton Lavrenov
2015-04-26 15:20:11 +07:00
parent 42eda94675
commit 744dd61992
4 changed files with 38 additions and 11 deletions

View File

@@ -1340,7 +1340,7 @@
attrs[key] = obj[key];
}
var node = new Konva[className](attrs);
var node = new this.constructor(attrs);
// copy over listeners
for(key in this.eventListeners) {
allListeners = this.eventListeners[key];