OK, Angel,

That's a good test. A few problems there.

(1) a bug in the Java2Script library was causing the location of
j2sjmol.lib to be miscalculated -- fixed (see
http://chemapps.stolaf.edu/jmol/jsmol/j2s/j2sjmol.js, line 3791, Renjian)

(2) incomplete Info object -- You need an explicit console item there. I
think one can make the case for having a different Info block for each
applet; also, I think I will make the console item as it is on these pages
the default; this seems to be working nicely to have it associated with
that info panel. See http://chemapps.stolaf.edu/jmol/jsmol/test3.htm

(3) we're going to have to stay away from percentages for width and height
until we understand the canvas better. I do not see how that works.
Changing the size of a canvas does not change its inherent width and
height. So page changes will make the image bigger or smaller but not
different resolution. And apparently there is some resizing that goes on as
a page loads, so that is a problem. Looks like you have to replace it with
another one if changing the width and height in pixels is what you want. I
might be missing something there, but I think that's the way it works.
That's a flaw in the design of <canvas> if that's true.

Bob




On Wed, Nov 21, 2012 at 2:33 PM, Angel Herráez <angel.herr...@uah.es> wrote:

> Ok, after sorting out my problems with the JSmol file set, I can now
> --again--
> assert that where one JSmol works, two don't.
>
> This is my test code:
>
> var myJmol1,myJmol2;
> var myInfo = {
>         height: '50%',
>         width: '100%',
>         jarFile: "JmolApplet.jar",
>         jarPath: '..',
>         j2sPath: "../j2s",
>         use: 'HTML5',
>         debug: false
> };
> myJmol1 = Jmol.getApplet("myJmol1", myInfo);
> myJmol2 = Jmol.getApplet("myJmol2", myInfo);
> Jmol.script(myJmol1, 'load "maltosa.sdf";' );
> Jmol.script(myJmol2, 'load "celobiosa.sdf";' );
>
> If I remove the lines for Jmol2, one JSmol displays OK. With both JSmols,
> the loading chokes at the third line in the console report:
>
> call loadScript ..\java\package.js
> Application loaded.
> call loadScript ..\core.z.js -- required by ClazzNode
> call loadScript ..\core.z.js -- required by w3c script failed
>
> Using two different Info variables does not help.
>
> If I switch to use of Java, both applets display fine.
>
>
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to