removeChildren now removes all descendants. returned this for all applicable methods in Node, Layer, Stage, and Shape

This commit is contained in:
Eric Rowell
2013-06-06 22:45:31 -07:00
parent 824e9fdbee
commit ffc33a7676
6 changed files with 101 additions and 6 deletions

View File

@@ -59,6 +59,7 @@
container = document.getElementById(container);
}
this._setAttr(CONTAINER, container);
return this;
},
draw: function() {
// clear children layers
@@ -75,6 +76,7 @@
}
Kinetic.Node.prototype.draw.call(this);
return this;
},
/**
* draw layer scene graphs
@@ -99,6 +101,7 @@
setHeight: function(height) {
Kinetic.Node.prototype.setHeight.call(this, height);
this._resizeDOM();
return this;
},
/**
* set width
@@ -109,6 +112,7 @@
setWidth: function(width) {
Kinetic.Node.prototype.setWidth.call(this, width);
this._resizeDOM();
return this;
},
/**
* clear all layers
@@ -123,6 +127,7 @@
for(n = 0; n < len; n++) {
layers[n].clear();
}
return this;
},
/**
* remove stage
@@ -136,6 +141,7 @@
if(content && Kinetic.Util._isInDocument(content)) {
this.getContainer().removeChild(content);
}
return this;
},
/**
* get mouse position for desktop apps