Commit 18c5f854 authored by mcmlxxix's avatar mcmlxxix
Browse files

added tree.onOpen() and tree.onClose() event emitters. ex: tree.onOpen =...

added tree.onOpen() and tree.onClose() event emitters. ex: tree.onOpen = function() { do something when tree is opened };
parent 23bcec5d
......@@ -356,14 +356,18 @@ function Tree(frame,text,tree) {
this.open = function() {
if(properties.status&flags.CLOSED) {
properties.status&=~flags.CLOSED;
if(typeof this.onOpen == "function")
this.onOpen();
this.refresh();
}
this.refresh();
return true;
}
this.close = function() {
if(properties.status&flags.CLOSED)
return false;
properties.status|=flags.CLOSED;
if(typeof this.onClose == "function")
this.onClose();
this.refresh();
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment