Skip to content

Commit

Permalink
fixed close node not working - close vakata#1244
Browse files Browse the repository at this point in the history
  • Loading branch information
vakata committed Oct 7, 2015
1 parent 175bd40 commit e63f8ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions dist/jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@
* @param {Object} node the closed node
*/
this.trigger('close_node',{ "node" : obj });
if(!animation || !d.length) {
if(!d.length) {
/**
* triggered when a node is closed and the animation is complete
* @event
Expand All @@ -2644,10 +2644,11 @@
*/
this.trigger("after_close", { "node" : obj });
}
else if(d.length) {
else {
if(!animation) {
d[0].className = d[0].className.replace('jstree-open', 'jstree-closed');
d.attr("aria-expanded", false).children('.jstree-children').remove();
this.trigger("after_close", { "node" : obj });
}
else {
d
Expand Down
Loading

0 comments on commit e63f8ed

Please sign in to comment.