phetsims / molecule-polarity

"Molecule Polarity" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 6 forks source link

JSmol: why do we need to call _cover(false) ? #14

Open pixelzoom opened 9 years ago

pixelzoom commented 9 years ago

The normal procedure for instantiating a JSmol applet is:

Jmol.setDocument( false );
Jmol.getApplet( 'myApplet', Info ); // creates window[myApplet]
var div = document.createElement( 'div' );
div.innerHTML = Jmol.getAppletHtml( window[myApplet] );

This fails unless this additional line is added, which was discovered by searching through the applet's HTML code.

myApplet._cover( false );

This isn't required in any of the JSmol examples, and (judging by the underscore in its name) is a function that is internal to JSmol, not to be used by clients. It would be good to understand why this is required.

pixelzoom commented 9 years ago

Moved this issue to https://github.com/phetsims/litmus/issues/1

zepumph commented 7 years ago

The TODO I removed in the above commit was tied to this issue. I feel like it's a non issue, because we are not going to use the JSMolViewerNode. Leaving open so that @pixelzoom is aware of my understanding. Feel free to close.

pixelzoom commented 7 years ago

While it's unlikely that we'll use JSmol, it's not entirely impossible. It's been 3+ years since the first 2 screens were feature complete, and not inconceivable that it could be another 3+ years before we implement the 3D viewer. A lot could change in that time, which is why I kept JSmolViewerNode.js. So I'd like to keep the TODO that you removed in JSmolViewerNode.js. There's no harm in leaving it in, and no value in removing it.

zepumph commented 7 years ago

Done.

samreid commented 4 years ago

There are still TODOs marked for this issue, discovered during https://github.com/phetsims/chipper/issues/946

pixelzoom commented 4 years ago

This issue should not have been closed, because as https://github.com/phetsims/molecule-polarity/issues/14#issuecomment-316451418 says:

While it's unlikely that we'll use JSmol, it's not entirely impossible.

This issue can be closed when the Real Molecules screen has been fully implemented AND we are certain that JSmol will not be used.