venkatanagaraju / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

visitParents isn't working #493

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I made an extremely simple jsFiddle to show the issue.

http://jsfiddle.net/Michael_0/qfbwgmca/

Original issue reported on code.google.com by michael....@gmail.com on 27 Oct 2014 at 8:25

GoogleCodeExporter commented 9 years ago
Edit : http://jsfiddle.net/Michael_0/qfbwgmca/1/

Original comment by michael....@gmail.com on 28 Oct 2014 at 10:10

GoogleCodeExporter commented 9 years ago
The sample does not run (external dynatree lib is not loaded.
Anyway: the callback passed to visitParents receives the visited node. So it 
should be

node.visitParents(function (parentNode) {
        console.log("visitParents : " + parentNode.data.title);
}, false);

Original comment by moo...@wwwendt.de on 28 Oct 2014 at 8:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You are right, I forgot the callback's argument. Thank you.

Original comment by michael....@gmail.com on 29 Oct 2014 at 11:53