Hi, I am also quite interested in that.
> Can I save my app’s private UI state (preferences, etc) as a variable > or static function in JSmol so that PNGJ will write it to the .png > file? As far as I know user defined variables or functions (from jmolscript) are not saved within the Jmol state. The idea I have in the back of my mind is to use a file format Jmol understands and have my data (your private state) piggybacking in that file. May be as a comment in some file or in a jmol script file. Though I have not tried anything yet. I would welcome a solution supported by Jmol itself. > (I can imagine the user saving the PNGJ .png file to (say) a Google > Drive repository.) > > Can I get the PNGJ output as as a JSON object to save in browser’s > localStorage and use with a Jmol script “load …”? > (I can imagine using the browser’s localStorage as a way for the user > to pick up working on something that hadn’t yet been saved to (say) > the Google Drive repository. > Apparently you can save blobs in localStorage [1]. YOu can of course also save your private state in localStorage along side of the PNGJ but then you do not have everything in a self-contained file. Best Alexander [1] https://hacks.mozilla.org/2012/02/saving-images-and-files-in-localstorage/ ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users