Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
minor clarity tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Isao Yagi committed Jun 23, 2012
1 parent 27d0e53 commit dc77812
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions source/lib/app/autoload/mojit-proxy.client.js
Expand Up @@ -296,7 +296,10 @@ YUI.add('mojito-mojit-proxy', function(Y, NAME) {
* the dom.
*/
destroyChild: function(id, retainNode) {
var slot, doomed, children = this.getChildren(), child = children[id];
var slot,
doomed, // viewid/dom id
children = this.getChildren(),
child = children[id];

if (child) {
doomed = child.viewId;
Expand All @@ -306,6 +309,7 @@ YUI.add('mojito-mojit-proxy', function(Y, NAME) {
for (slot in children) {
if (children.hasOwnProperty(slot) && children[slot].viewId === id) {
doomed = id;
break;
}
}
}
Expand All @@ -332,10 +336,12 @@ YUI.add('mojito-mojit-proxy', function(Y, NAME) {
* the dom.
*/
destroyChildren: function(retainNode) {
var my = this;
Y.Object.each(this.getChildren(), function(child, childId) {
my.destroyChild(childId, retainNode);
});
var children = this.getChildren(), child;
for(child in children) {
if(children.hasOwnProperty(child)) {
this.destroyChild(child, retainNode);
}
}
},


Expand Down

0 comments on commit dc77812

Please sign in to comment.