You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there. I am using tree.js to render a tree on my page from dynamically generated JSON that I pass from Flask.
It works great.
However, I want to render a .txt file on the same page when an item in the tree is clicked.
Is there a way to get the full path of the item in your tree, will all parents?
Since I dynamically generate path for rendering .txt, I need to attach it to the base path on line 57.
If I use it as it is now on line 57, and if I file is deeper in hierarchy, I am getting no output.
Thank you!
The text was updated successfully, but these errors were encountered:
Is there a way to get the full path of the item in your tree, will all parents?
Use hierarchy method.
// keep track of the original node objectstree.on('created',(e,node)=>{e.node=node;});tree.on('select',e=>{console.log(tree.hierarchy(e).map(e=>[e,e.node]));});
Hello there. I am using tree.js to render a tree on my page from dynamically generated JSON that I pass from Flask.
It works great.
However, I want to render a .txt file on the same page when an item in the tree is clicked.
Is there a way to get the full path of the item in your tree, will all parents?
Since I dynamically generate path for rendering .txt, I need to attach it to the base path on line 57.
If I use it as it is now on line 57, and if I file is deeper in hierarchy, I am getting no output.
Thank you!

The text was updated successfully, but these errors were encountered: