Feature Requests item #2810510, was opened at 2009-06-22 14:47
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=2810510&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: HUWagner (huwagner)
Assigned to: Nobody/Anonymous (nobody)
Summary:  two independent molecules in one browser window

Initial Comment:
We have problems to show two independent molecules in one browser window. 
Please see:
http://wchem.cup.lmu.de/wmol/ld-lacticacid.html
We want to show f.e. the two enantiomers of a molecule, or two or more 
conformers ...
The browser firefox often does not load both applets and then it "hangs" ...
but some times it works, especially when testing it locally.
What's wrong with our implemenation ?

----------------------------------------------------------------------

>Comment By: Bob Hanson (hansonr)
Date: 2009-06-22 23:55

Message:
Sometimes, if the browser is loading files remotely and there are two
applets loading simultaneously, the Java file caching gets messed up. You
could try two things:

1) Use the single-file jar, not the sequential-loading one. Then you only
have one file instead of 10 to worry about. To do that, use:

      jmolInitialize("JmolFolder", "JmolApplet.jar");


2) Only start the loading of the second applet when the first is complete.
This is simple enough to do:

in your page HTML use:

           jmolApplet(400, "javascript appletLoaded()")

twice, one for each applet. Then in the JavaScript:

nLoaded = 0
function appletLoaded() {
  if (++nLoaded < 2)return
 // waits for both applets to complete loading
 // now send the two scripts. Could also try jmolScriptWait() here

  jmolScript( "load ./xyz/L-Milchsre.mol; wireframe 0.1; spacefill 20%
spacefill on; zoom  100;background lightgrey;stereo REDCYAN;set spinY
20;spin on;", 0)
  jmolScript("load ./xyz/D-Milchsre.mol; wireframe 0.1; spacefill 20%
spacefill on; zoom 100;background lightgrey;stereo REDCYAN;set spinY
-20;spin on;", 1)
}



 



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=2810510&group_id=23629

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to