jsTreeR icon indicating copy to clipboard operation
jsTreeR copied to clipboard

Are there any examples of jsTreeR where the user can save/download a tree structure and later retrieve it/upload it into an active session?

Open lgirola opened this issue 1 year ago • 3 comments

I have built an App using jsTreeR where the tree structure the user creates is reflected in a mirror dataframe, and that dataframe then drives a series of mathematical operations. The user can create very elaborate trees with multiple branches. It would be helpful if the user could download or "save" a tree, naming each saved tree; and later upload or retrieve a tree to continue working on it or to simply activate that tree in order to run that mathematical operation. I could see a user needing a "library" of trees. Does jsTreeR have this capability? Are there any examples of this having been done?

I'm open to any suggestions. The image gives an example of "saving a tree" Image1 .

lgirola avatar Aug 06 '22 16:08 lgirola

Hmm, maybe there's a plugin for that, I don't know this one yet: https://stackoverflow.com/questions/35465803/jstree-wont-save-state-if-the-data-not-defined-in-core

stla avatar Aug 07 '22 07:08 stla

But that will probably save the whole tree, not a part.

stla avatar Aug 07 '22 07:08 stla

You can pass input[["yourTreeID_full"]] into a list() and e.g. save() it as an .RData file. Later load() it and pass it to jstree()'s nodes parameter. Works fine.

ismirsehregal avatar Oct 25 '23 08:10 ismirsehregal