Rolf,

Yeah, I forgot that fixed can still be dragged. The leap behavior is that a 
click makes it jump to another part of the page, and then in becomes draggable.

In tracking where this div is located in the DOM, it sure looks like it’s just 
OUTSIDE the body. It’s originally set to position:absolute. Outside the body is 
sure a smart way to keep something out of the page author's way. I never would 
have thought about that. If I’m correct about it’s original location, I did not 
know that the DOM could access it. 

It also seems that the div does not exist until you open the console the first 
time. By the way, I can set it to position:relative, but it’s still draggable???

My problem might already be solved by just being able to move it when opened. 

This all my sound nuts, but the console is useful on the iPad. To use it, 
however, I have to open it out of the way. I also have to write overlaying 
buttons to replace the console buttons. They are not clickable on the iPad.  
All this is doable if I can place the console at a specific location, and your 
suggestion allows me to do that. On the iPad, you cannot click, drag, or move 
anything in the console. You can use it, however. So, I want to set it in place 
on open (done thanks to your suggestion), write buttons in my page to control 
it (done at a testing level), and place these buttons aesthetically over the 
existing console buttons (next step).

That last step is not as hard as I thought. At position: absolute, it’s not 
draggable on an iPad anyway.

I am super impressed with how well Jmol works on an iPad. I’d like to add 
console control. I’m close!

Otis

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

> On Jul 28, 2017, at 3:18 PM, Rolf Huehne <rolf.hue...@leibniz-fli.de> wrote:
> 
> Am 28.07.17 um 20:14 schrieb Otis Rothenberger:
>> Rolf and Angel,
>> 
>> OK, I’m close. Rolf, I’m taking a JS shortcut with your function, but I
>> think it’s valid.
>> 
>> 
>> 1) $("#jmolApplet0_console").css("top",20);
>> $("#jmolApplet0_console").css("left",20);
>> $("#jmolApplet0_console").css("position","fixed")
>> 
>> Obediently, snaps the console to 20, 20, but it’s not position:fixed.
>> Rather it click-touch/ leaps, and then drags.
>> 
> Otis, I am not sure what you mean by "it click-touch/ leaps, and then drags".
> 
> Do you mean that the user can still move it around by dragging it?
> Or does it really don't stay at it's position when you scroll down?
> 
> "fixed" in the CSS sense doesn't mean that it cannot be moved by a handle, 
> which is similar to what you are doing with your Javascript commands. It just 
> means that it stays at it's position if the page is scrolled vertically or 
> horizontally.
> 
> 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