From: Jaime P. <jai...@we...> - 2014-01-30 08:32:30
|
Is there a way to force loading JSmol when loading/rendering a page? JQuery should be able to do this. This is why we might need to start with a fresh loaded JSmol: When clicking a ‘back to previous page’ button on On Mac 10.9.1, Safari 7.0.1, JSmol renders non-operational. On Firefox 26.0, same Mac, it works Ok. To test (better than the previous explanation): 1. go to http://proteopedia.org/w/3rec 2. verify if JSmol is working, ie mouse rotates model, zooms, etc. 3. go to another page by clicking a link, like ‘About Proteopedia’ in the bottom mid section 4. click on the browser’s ‘back to previous page’ button to display again the page 3rec 5. verify if JSmol is working, ie mouse rotates model, zooms, etc. The main difference is that Firefox actually reloads JSmol on page back. Safari simply tries to work with what’s available, rendering a broken applet. Jaim |
From: Philip B. <pb...@sa...> - 2014-01-30 14:28:03
|
Two comments: I see the difference that you do except that the applet works fine in Safari when I come back to the page. That is, I do not see a broken applet, it is just not refreshed. (Mac OS 10.9.1) I thought that the Safari behavior was the normal for the back button. I hate it when I am reading and article, click a link to another page, and then when I come back to the original, the page reloads and I have to search for where I was. On Jan 30, 2014, at 3:32 AM, Jaime Prilusky <jai...@we...> wrote: > Is there a way to force loading JSmol when loading/rendering a page? JQuery should be able to do this. > > This is why we might need to start with a fresh loaded JSmol: When clicking a ‘back to previous page’ button on On Mac 10.9.1, Safari 7.0.1, JSmol renders non-operational. On Firefox 26.0, same Mac, it works Ok. > > To test (better than the previous explanation): > > 1. go to http://proteopedia.org/w/3rec > > 2. verify if JSmol is working, ie mouse rotates model, zooms, etc. > > 3. go to another page by clicking a link, like ‘About Proteopedia’ in the bottom mid section > > 4. click on the browser’s ‘back to previous page’ button to display again the page 3rec > > 5. verify if JSmol is working, ie mouse rotates model, zooms, etc. > > The main difference is that Firefox actually reloads JSmol on page back. Safari simply tries to work with what’s available, rendering a broken applet. > > Jaim > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users Philip Bays Emeritus Professor of Chemistry Saint Mary's College Notre Dame, IN 46556 pb...@sa... |
From: Rolf H. <rh...@fl...> - 2014-01-30 14:55:05
|
On 01/30/2014 01:11 PM, Philip Bays wrote: > Two comments: > I thought that the Safari behavior was the normal for the back button. I hate it when I am reading and article, click a link to another page, and then when I come back to the original, the page reloads and I have to search for where I was. > For applets this doesn't seem to be true. Although there is no new server contact, Java applets seem to get reinitialized when the back button is used. I never observed a different behaviour in any browser (but I rarely used Safari). And the same seems to be true for JSmol as well. (Reasons for this might be to free memory or to minimize the risks of interferences with other pages.) Regards, Rolf -- Rolf Huehne Postdoc Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) Beutenbergstrasse 11 07745 Jena, Germany Phone: +49 3641 65 6205 Fax: +49 3641 65 6210 E-Mail: rh...@fl... Website: http://www.fli-leibniz.de Scientific Director: Prof. Dr. K. Lenhard Rudolph Head of Administration: Dr. Daniele Barthel Chairman of Board of Trustees: Dennys Klein VAT No: DE 153 925 464 Register of Associations: No. 230296, Amtsgericht Jena Tax Number: 162/141/08228 |
From: Otis R. <osr...@ch...> - 2014-01-30 16:27:07
|
Jaim, I see what you're seeing with Safari. Just to add a data point to the discussion, when I use the location box to navigate to another site (e.g. Google.com), the back button does force a reload of JSmol on your page. When I try this same location box approach with: http://proteopedia.org/wiki/index.php/Proteopedia:Structure_Index The back button still does not reload JSmol - i.e. unlike going to Google.com Maybe within the same domain, Safari simply goes to cache without supporting files when you use the back button??? You could prevent browser page caching with meta tags. You can also do this with JavaScript by defining an empty unbeforeunload function. I was never sure if either of these affected supporting files, however. I'm not sure you want to go this route. JSmol in user cache is a big plus. Otis -- Otis Rothenberger ot...@ch... http://chemagic.com On Jan 30, 2014, at 3:32 AM, Jaime Prilusky <jai...@we...> wrote: > Is there a way to force loading JSmol when loading/rendering a page? JQuery should be able to do this. > > This is why we might need to start with a fresh loaded JSmol: When clicking a ‘back to previous page’ button on On Mac 10.9.1, Safari 7.0.1, JSmol renders non-operational. On Firefox 26.0, same Mac, it works Ok. > > To test (better than the previous explanation): > > 1. go to http://proteopedia.org/w/3rec > > 2. verify if JSmol is working, ie mouse rotates model, zooms, etc. > > 3. go to another page by clicking a link, like ‘About Proteopedia’ in the bottom mid section > > 4. click on the browser’s ‘back to previous page’ button to display again the page 3rec > > 5. verify if JSmol is working, ie mouse rotates model, zooms, etc. > > The main difference is that Firefox actually reloads JSmol on page back. Safari simply tries to work with what’s available, rendering a broken applet. > > Jaim > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Jaime P. <jai...@we...> - 2014-01-30 17:32:42
|
Thank you for the additional testing and suggestions. I tested now on Chrome Version 32.0.1700.102, same Mac, and it works great: no freezing. I had the idea that Safari and Chrome shared a lot of internal code, but it seems that their behaviour with objects is different. The freezing, of course, also happens on other sites using JSmol, like http://chemapps.stolaf.edu/jmol/jsmol/simple.htm Jaim On Jan 30, 2014, at 5:20 PM, Otis Rothenberger <osr...@ch...<mailto:osr...@ch...>> wrote: Jaim, I see what you're seeing with Safari. Just to add a data point to the discussion, when I use the location box to navigate to another site (e.g. Google.com<http://google.com/>), the back button does force a reload of JSmol on your page. When I try this same location box approach with: http://proteopedia.org/wiki/index.php/Proteopedia:Structure_Index The back button still does not reload JSmol - i.e. unlike going to Google.com<http://google.com/> Maybe within the same domain, Safari simply goes to cache without supporting files when you use the back button??? You could prevent browser page caching with meta tags. You can also do this with JavaScript by defining an empty unbeforeunload function. I was never sure if either of these affected supporting files, however. I'm not sure you want to go this route. JSmol in user cache is a big plus. Otis -- Otis Rothenberger ot...@ch...<mailto:ot...@ch...> http://chemagic.com On Jan 30, 2014, at 3:32 AM, Jaime Prilusky <jai...@we...<mailto:jai...@we...>> wrote: Is there a way to force loading JSmol when loading/rendering a page? JQuery should be able to do this. This is why we might need to start with a fresh loaded JSmol: When clicking a ‘back to previous page’ button on On Mac 10.9.1, Safari 7.0.1, JSmol renders non-operational. On Firefox 26.0, same Mac, it works Ok. To test (better than the previous explanation): 1. go to http://proteopedia.org/w/3rec 2. verify if JSmol is working, ie mouse rotates model, zooms, etc. 3. go to another page by clicking a link, like ‘About Proteopedia’ in the bottom mid section 4. click on the browser’s ‘back to previous page’ button to display again the page 3rec 5. verify if JSmol is working, ie mouse rotates model, zooms, etc. The main difference is that Firefox actually reloads JSmol on page back. Safari simply tries to work with what’s available, rendering a broken applet. Jaim ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ Jmol-users mailing list Jmo...@li...<mailto:Jmo...@li...> https://lists.sourceforge.net/lists/listinfo/jmol-users ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ Jmol-users mailing list Jmo...@li... https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Otis R. <osr...@ch...> - 2014-01-30 18:46:39
|
Jaim, I see the same thing you are seeing on Bob's page. But... Interesting point: I don't see any of this problem on my site - Safari, cross domain or within domain: http://chemagic.com/JSmolVMK2.htm After above load, location box = chemagic.com followed by back button reloads JSmol The only thing I can think is that it might be related to one of the page/Jmol loaded calls that I use: 1) body onload= 2) JSmol ready function 3) JSmol structure loaded callback Maybe also, server setting related to caching??? Otis -- Otis Rothenberger ot...@ch... http://chemagic.com On Jan 30, 2014, at 11:57 AM, Jaime Prilusky <jai...@we...> wrote: > Thank you for the additional testing and suggestions. > > I tested now on Chrome Version 32.0.1700.102, same Mac, and it works great: no freezing. I had the idea that Safari and Chrome shared a lot of internal code, but it seems that their behaviour with objects is different. > > The freezing, of course, also happens on other sites using JSmol, like http://chemapps.stolaf.edu/jmol/jsmol/simple.htm > > Jaim > |
From: Jaime P. <jai...@we...> - 2014-02-02 04:33:24
|
Otis, Thank you for the suggestions. Looking into that, Jaim On Jan 30, 2014, at 8:46 PM, Otis Rothenberger <osr...@ch...<mailto:osr...@ch...>> wrote: Jaim, I see the same thing you are seeing on Bob's page. But... Interesting point: I don't see any of this problem on my site - Safari, cross domain or within domain: http://chemagic.com/JSmolVMK2.htm After above load, location box = chemagic.com<http://chemagic.com/> followed by back button reloads JSmol The only thing I can think is that it might be related to one of the page/Jmol loaded calls that I use: 1) body onload= 2) JSmol ready function 3) JSmol structure loaded callback Maybe also, server setting related to caching??? Otis -- Otis Rothenberger ot...@ch...<mailto:ot...@ch...> http://chemagic.com On Jan 30, 2014, at 11:57 AM, Jaime Prilusky <jai...@we...<mailto:jai...@we...>> wrote: Thank you for the additional testing and suggestions. I tested now on Chrome Version 32.0.1700.102, same Mac, and it works great: no freezing. I had the idea that Safari and Chrome shared a lot of internal code, but it seems that their behaviour with objects is different. The freezing, of course, also happens on other sites using JSmol, like http://chemapps.stolaf.edu/jmol/jsmol/simple.htm Jaim ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ Jmol-users mailing list Jmo...@li... https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Charles H. S. <cshubert@MIT.EDU> - 2014-01-31 21:32:25
|
Hi, When my users open my app, I'd like for JSmol to be in the same state that they left it in. My users can generate quite a bit of JSmol script. Currently, I'm using the browser's localStorage to store app state in a JSON object. What would be the preferred way to extract JSmol state including rendering, orientation, zoom, etc, to save for my user's next visit? I can imagine accumulating the user's JSmol script, saving it, and using it to restore JSmol, but I'm not sure how to save the orientation. I'd appreciate any thoughts that you have on this. Thanks, --Chuck |
From: Paul P. <pau...@ac...> - 2014-02-01 05:44:20
|
Hi Chuck, have you tried « get property stateInfo » ? It should restore everything including orientation, zoom, etc… Paul Le 31 janv. 2014 à 16:32, Charles Harrison Shubert <cshubert@MIT.EDU> a écrit : > Hi, > > When my users open my app, I'd like for JSmol to be in the same state that they left it in. My users can generate quite a bit of JSmol script. Currently, I'm using the browser's localStorage to store app state in a JSON object. > > What would be the preferred way to extract JSmol state including rendering, orientation, zoom, etc, to save for my user's next visit? I can imagine accumulating the user's JSmol script, saving it, and using it to restore JSmol, but I'm not sure how to save the orientation. > > I'd appreciate any thoughts that you have on this. > > Thanks, > > --Chuck > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Robert H. <ha...@st...> - 2014-02-01 22:17:47
|
very best way is to have the user save a PNGJ file -- write PNGJ "?.png" and then have them drag-drop it back into Jmol when they want to restore it. On Fri, Jan 31, 2014 at 3:41 PM, Paul Pillot < pau...@ac...> wrote: > Hi Chuck, > have you tried << get property stateInfo >> ? It should restore everything > including orientation, zoom, etc... > Paul > > Le 31 janv. 2014 à 16:32, Charles Harrison Shubert <cshubert@MIT.EDU> a > écrit : > > > Hi, > > > > When my users open my app, I'd like for JSmol to be in the same state > that they left it in. My users can generate quite a bit of JSmol script. > Currently, I'm using the browser's localStorage to store app state in a > JSON object. > > > > What would be the preferred way to extract JSmol state including > rendering, orientation, zoom, etc, to save for my user's next visit? I can > imagine accumulating the user's JSmol script, saving it, and using it to > restore JSmol, but I'm not sure how to save the orientation. > > > > I'd appreciate any thoughts that you have on this. > > > > Thanks, > > > > --Chuck > > > > > > > ------------------------------------------------------------------------------ > > WatchGuard Dimension instantly turns raw network data into actionable > > security intelligence. It gives you real-time visual feedback on key > > security issues and trends. Skip the complicated setup - simply import > > a virtual appliance and go from zero to informed in seconds. > > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > _______________________________________________ > > Jmol-users mailing list > > Jmo...@li... > > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Charles H. S. <cshubert@MIT.EDU> - 2014-02-03 16:02:22
|
Hi Bob and Paul, Thanks for your replies (both are very helpful). The PNGJ functionality looks great! 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? (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. Thanks, —Chuck On Feb 1, 2014, at 5:17 PM, Robert Hanson <ha...@st...<mailto:ha...@st...>> wrote: very best way is to have the user save a PNGJ file -- write PNGJ "?.png" and then have them drag-drop it back into Jmol when they want to restore it. On Fri, Jan 31, 2014 at 3:41 PM, Paul Pillot <pau...@ac...<mailto:pau...@ac...>> wrote: Hi Chuck, have you tried « get property stateInfo » ? It should restore everything including orientation, zoom, etc… Paul Le 31 janv. 2014 à 16:32, Charles Harrison Shubert <cshubert@MIT.EDU<mailto:cshubert@MIT.EDU>> a écrit : > Hi, > > When my users open my app, I'd like for JSmol to be in the same state that they left it in. My users can generate quite a bit of JSmol script. Currently, I'm using the browser's localStorage to store app state in a JSON object. > > What would be the preferred way to extract JSmol state including rendering, orientation, zoom, etc, to save for my user's next visit? I can imagine accumulating the user's JSmol script, saving it, and using it to restore JSmol, but I'm not sure how to save the orientation. > > I'd appreciate any thoughts that you have on this. > > Thanks, > > --Chuck > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Jmol-users mailing list > Jmo...@li...<mailto:Jmo...@li...> > https://lists.sourceforge.net/lists/listinfo/jmol-users ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Jmol-users mailing list Jmo...@li...<mailto:Jmo...@li...> https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________ Jmol-users mailing list Jmo...@li... https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Alexander R. <ale...@we...> - 2014-02-03 17:44:14
|
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/ |
From: Robert H. <ha...@st...> - 2014-02-05 21:45:21
|
PNGJ is not designed to save any settings other than those that are specifically necessary to define a state. So no user variables, no overall preferences. You could save a "message" in the state by using the message command, I suppose, but that would have to be a message that was visible to the user. Oh, and perhaps in some relatively unused variable such as set nmrpredictformat "testing messages here" This would be human- or machine-readable in the state associated with the PNGJ file if reopened by Jmol. Although, come to think of it, I think I will remove that from the state. So don't consider this method supported! Bob On Mon, Feb 3, 2014 at 11:44 AM, Alexander Rose <ale...@we... > wrote: > 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 > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Charles H. S. <cshubert@MIT.EDU> - 2014-02-05 22:05:19
|
Hi Bob, I guess I would have been surprised if a backdoor existed. Thanks for thinking about this. —Chuck On Feb 5, 2014, at 4:45 PM, Robert Hanson <ha...@st...<mailto:ha...@st...>> wrote: PNGJ is not designed to save any settings other than those that are specifically necessary to define a state. So no user variables, no overall preferences. You could save a "message" in the state by using the message command, I suppose, but that would have to be a message that was visible to the user. Oh, and perhaps in some relatively unused variable such as set nmrpredictformat "testing messages here" This would be human- or machine-readable in the state associated with the PNGJ file if reopened by Jmol. Although, come to think of it, I think I will remove that from the state. So don't consider this method supported! Bob On Mon, Feb 3, 2014 at 11:44 AM, Alexander Rose <ale...@we...<mailto:ale...@we...>> wrote: 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 Jmo...@li...<mailto:Jmo...@li...> https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ------------------------------------------------------------------------------ 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 Jmo...@li... https://lists.sourceforge.net/lists/listinfo/jmol-users |