Hello,
we are developing a prototype for a web application that gathers Cosmic Ray data to produce a ROOT file (this with C++ code).
The ROOT file is then displayed with JSROOT in a web page where the user can interact with it using the standard tools provided by JSROOT (browser side).
It would be useful if the user could then be able to save (download) a ROOT file that would represent the original ROOT file plus the all the changes made by the user with JSROOT browser side.
So far we did not find a JSROOT api/function to achieve this, only a “save as PNG” link in the JSROOT menu for the displayed graph.
Please can you give us advice on the matter ?
Thanks a lot,
Cheers,
L.
It would be useful if the user could then be able to save (download) a ROOT file that would represent the original ROOT file plus the all the changes made by the user with JSROOT browser side.
Such functionality not yet implemented in JSROOT.
There are many canvas/objects attributes, which could be interactively changed.
All together - one need possibility to store complete canvas after these changes.
Binary storage is not supported in JSROOT.
The only alternative - JSON files.
I could try to implement this for some basic use-cases,
but then you need to store such data on the server.
Hi,
thanks a lot for your prompt answer !
If with JSON we could collect the information about the original graphs and the main changes made by the user with JSROOT browser side, it would be great.
We look forward to your updates.
Thanks !
L.
In JSROOT dev version I introduce new function called JSROOT.StoreJSON().
It allows to store shown objects in JSON. It is pure text representation and can be transferred to/from server, store there and so on.
JSON can be parsed with JSROOT.parse() function and resulted object used for drawing again.
Main canvas attributes (but not all) are preserved by this.
It is very first draft for the functionality - means many features may not work.
If you have any suggestions or problems - please let me know, that I could fix them.