Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
remove changed event
Browse files Browse the repository at this point in the history
  • Loading branch information
brighthas committed Mar 9, 2014
1 parent f13e79c commit 7cbeb4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
23 changes: 6 additions & 17 deletions index.js
Expand Up @@ -57,9 +57,7 @@ o.createChild = function () {
root.emit("child list changed",this,this._childIdsList.concat());

}
root.emit("changed",root);



return child;
}

Expand All @@ -86,9 +84,6 @@ o.appendChild = function (child) {
root.emit("add",child,this);
root.emit("child list changed",this,this._childIdsList.concat());
}

root.emit("changed",root);


return this;
}
Expand All @@ -113,9 +108,7 @@ o.removeChild = function (childId) {
root.emit("remove",child,parent);
root.emit("child list changed",parent,parent._childIdsList.concat());
}

root.emit("changed",root);


}

return this;
Expand Down Expand Up @@ -152,8 +145,7 @@ o.replaceNode = function (child, targetId) {
root.emit("add",child,parent);
root.emit("child list changed",parent,parent._childIdsList.concat());
}
root.emit("changed",root);


return this;
}

Expand Down Expand Up @@ -218,8 +210,7 @@ o.top = function (childId) {
if(root !== this){
root.emit("child list changed",parent,parent._childIdsList.concat());
}
root.emit("changed",root);


}

return this;
Expand All @@ -239,8 +230,7 @@ o.up = function (childId) {
if(root !== this){
root.emit("child list changed",parent,parent._childIdsList.concat());
}
root.emit("changed",root);


}
return this;
}
Expand Down Expand Up @@ -406,8 +396,7 @@ o.data = function () {
if(root !== this){
root.emit("data change",this,obj);
}
root.emit("changed",root);


return this;

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tree-node",
"version": "0.1.4",
"version": "0.1.5",
"description": "tree node",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7cbeb4b

Please sign in to comment.