Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-05-08 Thread Angel Herráez
I'm having a similar problem as Jonathan's. Two canvas2d objects are created. I believe there is something wrong with Jmol.getAppletHtml() The problem does not happen when I use Jmol.getApplet() directly in the div. Note: I am using jquery-1.10.2.min.js plus JSmol.min.nojq.js Symptoms:

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-05-08 Thread Robert Hanson
That's not enough to go on. Yes, the applet is creating itself twice. As described above, we need to check what is happening with proto._createCanvas2d You must determine why it is running twice. Also, correct your img tag. It is not closed. On Thu, May 8, 2014 at 4:50 AM, Angel

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-05-08 Thread Robert Hanson
I have an idea. Try changing this: proto._createCanvas2d = function(doReplace) { var container = Jmol.$(this, appletdiv); if (doReplace) { ... to proto._createCanvas2d = function(doReplace) { var container = Jmol.$(this, appletdiv);

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-05-08 Thread Angel Herráez
Hi Removing the assignment of Info.coverImage makes the problem go. -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149;

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-05-08 Thread Robert Hanson
I don't see how this is a covered or deferred applet. The following, in $.(document).ready, should immediately replace your image. $('#viewerViewer').html(Jmol.getAppletHtml('JmolOb',viewerMolec.infoJmol)) Right? So how is that a cover image? Are you sure you have this in JSmol.min.nojq.js?

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Robert Hanson
Looks perfect. And that's in $(document).ready ? On Sun, Apr 20, 2014 at 9:42 PM, Jonathan Gutow gu...@uwosh.edu wrote: These applets are created on the fly on a page that is already in existence using a call that looks like:

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Gutow, Jonathan H
It isn't actually in $(document).ready because the call is triggered by a watch function that is looking for the div created by AJAX activity. If the div contains a particular hidden div this is called. Jonathan On Apr 21, 2014, at 9:32 AM, Robert Hanson hans...@stolaf.edu wrote: Looks

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Robert Hanson
Any chance you can provide a link to an offending page? What did you learn from inspect element? Is it a duplicate? What is its outerHTML value? Sounds to me like something is running twice. On Mon, Apr 21, 2014 at 10:11 AM, Gutow, Jonathan H gu...@uwosh.edu wrote: It isn't actually in

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Gutow, Jonathan H
At present it is on my development lap top. To test you would have to set up the whole SAGE server. I will look for a way that it could be launching twice. thanks, Jonathan On Apr 21, 2014, at 11:38 AM, Robert Hanson hans...@stolaf.edu wrote: Any chance you can provide a link to an offending

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Robert Hanson
I'm sure that some simple element inspection will answer your question. Send me that if you need to. On Mon, Apr 21, 2014 at 5:39 PM, Gutow, Jonathan H gu...@uwosh.edu wrote: At present it is on my development lap top. To test you would have to set up the whole SAGE server. I will look for

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Jonathan Gutow
Bob, Thanks for agreeing to look at this. I'm sending the two parts that seem relevant. 1) The div that is loaded with the applethtml using the calls mentioned previously. As you can see this puts up a static image and awaits the user click. {{{ div id=jmol0 class=ui-resizable

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-21 Thread Robert Hanson
I guess you just have to send me your computer. :) Clearly you are getting multiple calls to the canvas creation method. canvas id=jmolApplet0_canvas2d style=width: 100%; height: 100%; z-index: 7; width=400 height=400/canvas canvas id=jmolApplet0_canvas2d style=width: 100%; height: 100%;

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-20 Thread Robert Hanson
Something's going wrong with your code, but I don't know from this. Try using Firefox and Inspect Element to see what that object is. My guess is that you are generating the canvas twice. Are you being sure to NOT use Jmol.getApplet() within the page and instead are only creating the applet within

Re: [Jmol-developers] What is the second Canvas2d for that shows up below the active one when using JSmol?

2014-04-20 Thread Jonathan Gutow
These applets are created on the fly on a page that is already in existence using a call that looks like: $('#'+jmolDivStr).html(Jmol.getAppletHtml(jmolApplet+appletID,jmolStatus.jmolInfo[appletID])); *jmolDivStr contains the string name of the div the applet is being inserted into. This div is