Here are four examples

 

http://www.chem.purdue.edu/jmol/nmr/example-java.html

http://www.chem.purdue.edu/jmol/nmr/example-html5.html

http://www.chem.purdue.edu/jmol/nmr/example-html5-direct.html

http://www.chem.purdue.edu/jmol/nmr/example-html5-resize.html

 

The first two are identical save for the javascript they load differ in the
info.use mode setting. They defer rendering until a panel goes active. The
initially active panel is activated at <body onLoad. time.

The third renders during load and gives grainy images for inactive pages.
The initially active panel is assigned to the active class in the original
HTML and renders well. The fourth renders during load as well, but with a
call to resizeApplet to the original size when it goes active; it renders
beautifully so at least there is an easy workaround.

 

From: Robert Hanson [mailto:[email protected]] 
Sent: Thursday, March 21, 2013 1:09 PM
To: [email protected]; [email protected]
Subject: Re: [Jmol-users] JSmol HTML5 mode does not play nice with style
display: none

 

examples are needed. There must be an explanation to this, but it may take
some experimentation to find it. Resizing of the HTML5 canvas is now
working, and it could be that it is related to that.

 

On Thu, Mar 21, 2013 at 9:49 AM, Phillip Wyss <[email protected]> wrote:

I have a web application which uses tabbed panels where the inactive panels
are styled "display: none" and when their tab is click is switched to
"display: block" and the  previously active block is re-styled to "display:
none". This all works great using the Java applet, but using basic HTML5
rendering, only the initially active panel is rendered correctly. When
activating other panels, the rendered image is grainy and clicking on it
causes it to be re-rendered all or partly out of its clip area. This happens
on Explorer 9, Firefox (Windows and Mac), Chrome(Windows and Mac) and
Safari. Changing the initially active panel just causes that panel to be the
one that is rendered correctly.

 

I tried to remedy the problem by using the Jmol.setDocument(0) and then
setting the innerHTML of the appropriate <div> as described at
http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Jmol.setDocument when
a panel is initially activated. Again, this works great using the Java
applet, but fails with javascript errors (b is undefined) using HTML5
rendering.

 

This is not a particular show-stopper for this application as I need the
Java plug-in for JSpecview anyway, but I had some thoughts about using the
same strategy to style multi-structure pages (vibrational normal modes) on
mobile devices with limited real-estate.


----------------------------------------------------------------------------
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Jmol-users mailing list
[email protected]
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

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to