adding removeChildren() for layout and fixing comment typos

This commit is contained in:
Matt Donovan
2015-06-06 14:11:00 -05:00
committed by Vladimir Enchev
parent 8bc2aedfae
commit e79fd51ce4
2 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,11 @@
*/
removeChild(view: view.View);
/**
* Removes all views in this layout.
*/
removeChildren();
/**
* Gets or sets padding style property.
*/

View File

@ -56,6 +56,12 @@ export class LayoutBase extends view.CustomLayoutView implements definition.Layo
this._subViews.splice(index, 1);
}
public removeChildren() {
while (this.getChildrenCount() != 0) {
this.removeChild(this._subViews[this.getChildrenCount() - 1]);
}
}
public _eachChildView(callback: (child: view.View) => boolean) {
var i;
var length = this._subViews.length;