Rolf and Angel,

OK, I have a lot of formatting to do, but I have this darn thing working on an 
iPad.

I was evidently correct in my first interpretation of the docs:

Console: 
Throws up a console window from which a user can enter script commands and 
monitor the messages returned by Jmol as, for example, from the show or 
getPropertycommand. JSmol note: <div id=JmolApplet0_console></div> sets a place 
on the page for the JSmol console.

When I put <div id=jmolApplet0_console></div> inside the body of my document, 
albeit with a lowercase “j”, the console stays where I put it (drag gone), and, 
more importantly, the buttons work in the iPad.

For reasons that I don’t understand, the close and help links are gone in the 
“new” console. I’m formatting the “new” console the same way Bob formats the 
“original” console (except for top and left):

<div id="jmolApplet0_console" class="jmolConsole" style="display: block; 
background-color: yellow; width: 600px; height: 362px; position: absolute; 
z-index: 100008; top: 700px; left: 0px;"></div>

It seems that iPad did not like this div outside the <body>. Now that the div 
is actually in my page code where I can edit it, I should be able to place it 
and show/hide as I need.

Otis


--
Otis Rothenberger
o...@chemagic.org
http://chemagic.org

> On Jul 28, 2017, at 12:56 PM, Rolf Huehne <rolf.hue...@leibniz-fli.de> wrote:
> 
> Am 28.07.17 um 18:35 schrieb Otis Rothenberger:
>> All,
>> 
>> I had some confused wording in my previous note!
>> 
>> Here’s my dilemma expressed more concisely: If the console is visible,
>> then the following have no affect:
>> 
>> $("#JmolApplet0_console").css("position","fixed”);
>> 
>> $("#JmolApplet0_console").css("position","fixed", "important");
>> 
>> This is true with or without my adding <div
>> id=JmolApplet0_console></div> to my page.
>> 
>> Also, $("#JmolApplet0_console").length equals zero, which suggests that
>> the div of that name does not exist.
>> 
>> Again, this is all with the console visible.
>> 
> It does work for me in JSmol 14.18.1 (Javascript). My guess would be that the 
> applet ID is not correct. Maybe a case problem "jmolApplet0"?
> 
> In the following example the 'console' function is redefined and takes four 
> parameters (the last two must be provided in quotes):
> 
> 1) X-position
> 2) Y-position
> 3) position mode ("fixed", "absolute")
> 4) applet ID
> 
> My applet ID is "jmolJSnet3D".
> It works for me if the console is closed or already open.
> 
> --- Example -----
> function console(x,y,mode,appletID) {
>  if ("" + x == "") {
>    x = 20;
>  }
>  if ("" + y == "") {
>    y = 20;
>  }
>  if (mode == "") {
>    mode = "absolute");
>  }
>  if (appletID == "") {
>    appletID = "jmolApplet0";
>  }
>  console;
>  command = '$("#' + appletID + '_console").css("top",' + x + '); $("#' + 
> appletID + '_console").css("left",' + y + '); $("#' + appletID + 
> '_console").css("position","' + mode + '");';
>  javascript @command;
> }
> 
> console(20,20,"fixed","jmolJSnet3D");
> -------------
> 
> Regards,
> Rolf
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to