ezraroi / ngJsTree

Angular Directive for the famous JS Tree
http://ezraroi.github.io/ngJsTree/
MIT License
270 stars 101 forks source link

Pushing multiple nodes in succession at root level hangs the browser #54

Open arshabh opened 8 years ago

arshabh commented 8 years ago

I have discovered that pushing multiple nodes at root level in succession hangs the browser. My findings reveal that a while loop is set infinitely in the nodesWatcher.onAdded method.

nodesWatcher.onAdded = function (node) {
                    while(blocked) {}
                    blocked = true;
                    var parent = scope.tree.jstree(true).get_node(node.parent);
                    var res = scope.tree.jstree(true).create_node(parent, node, 'inside',function() {
                        blocked = false;
                    });
                    if (!res) {
                        blocked = false;
                    }
                };
gglazer commented 8 years ago

+1

ezraroi commented 8 years ago

Can you please reproduce this on plunker?

arshabh commented 8 years ago

I am sorry - could not find time to reproduce this on plunkr. There were some issues in creating the plunkr initially and then i got busy. I will post a plunkr as soon as i get time. Also, i discovered that if i disable web-worker in the config options - i dont face this issue.

ezraroi commented 8 years ago

thanks

noob9527 commented 7 years ago

+1

yriiarutiunian commented 6 years ago

+1