In function Displays.drawImage the buf8 field is undefined. The reason is
probably calling imageBuffer = this.getImage (false, false); in Viewer.js:2207.
In working code it returns
<canvas width="420" height="300" id="jmolApplet0_canvas2d" style="width: 100%;
height: 100%; z-index: 20002; cursor: default;"></canvas>
but in my code it's only:
<canvas></canvas>
And in html code is still:
<script type="text/javascript">myJmol._cover(false)</script>
Any ideas?
On 2016-08-01 15:53:07, Tomasz Balawajder <[email protected]> wrote:
Thanks Robert, adding window.myJmol = myJmol helped, but there is another
problem. This is log from browser console:
JSmol load myJmol loadClazz...
JSmol load myJmol start applet...
JSmol exec myJmol loadClazz null -- OK
xhr.open async=false url=jsmol/j2s/core/package.js
Synchronous XMLHttpRequest on the main thread is deprecated because of its
detrimental effects to the end user's experience. For more help, check
https://xhr.spec.whatwg.org/.
xhr.open async=false url=jsmol/j2s/core/package.js
xhr.open async=false url=jsmol/j2s/core/corejmol.z.js
JSmol exec myJmol start applet null -- OK
xhr.open async=false url=jsmol/idioma/pl.po
xhr.open async=false url=jsmol/j2s/core/corescript.z.js
Uncaught TypeError: Cannot set property '0' of undefined
(anonymous function)@jsmol/j2s/core/corejmol.z.js:764
(anonymous function)@jsmol/j2s/core/corejmol.z.js:785
(anonymous function)@jsmol/j2s/core/corejmol.z.js:2389
(anonymous function)@jsmol/j2s/core/corejmol.z.js:2391
(anonymous function)@jsmol/j2s/core/corejmol.z.js:2385
(anonymous function)@jsmol/j2s/core/corejmol.z.js:2386
(anonymous function)@jsmol/j2s/core/corejmol.z.js:756
[email protected]:289
On 2016-07-30 04:33:46, Robert Hanson <[email protected]> wrote:
You could add an alert to see if myJmol has been created:
var applet = Jmol.getAppletHtml("myJmol", Info);
alert(self.myJmol)
Or, it is possible that somehow the myJmol variable is not being set globally,
in which case you could try:
var applet = Jmol.getAppletHtml("myJmol", Info);
window.myJmol = myJmol
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users