> The way too long problem is generally solved by dragging the menu higher
on the screen. 

I know. But still sometimes it's higher than the screen.
In many pages of mine the JSmol panel is 100% height, locked and cannot 
be scrolled down (overflow:none), so it's actually impossible to reach the 
lower submenus. That's how I noticed.
Example: http://biomodel.uah.es/en/model1/prot/alfa.htm


> It's a standard jQuery menu. 
> So if you can figure out 
> how to solve this with that, we could implement your solution in
JSmol.

Indeed. But  I found a trick using just css. 
See demo at
http://biomodel.uah.es/model1j/prot/alfa.htm
which is using a css patch in the page over regular JSmol.
The code is
.jmolPopupMenu ul.ui-menu { max-height:25em; overflow-y:auto; 
overflow-x:hidden; position:fixed; }

That makes scrollable just the Language submenu and those like 
Select > Protein > by residue name

However this patch breaks the unfolding of sub-submenus in IE11 (how much we 
should care about 
that browser, I'm not sure)
There is a trick also to avoid applying the former rules for IE11, though it 
uses
a dirty hack:
@media screen and (min-width:0\0) {
.jmolPopupMenu ul.ui-menu { max-height:none; overflow:hidden; 
position:absolute; }
}


Additionally, maybe personal taste, so I will not push for these to be 
implemented:
 to reduce the height of each submenu element:

ul.jmolPopupMenu , ul.jmolPopupMenu ul { line-height:1em; } 
/* or maybe 1.1em */

and to reduce the size of the checkboxes and so the height of their submenu 
items (like langs):

.jmolPopupMenu input[type="checkbox"] { transform: scale(0.8); 
margin-top:-0.2em; }


------------------------------------------------------------------------------
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to