Thanks Bob, but I’m still having problems. This may relate the approach that 
I’m using that worked in the past. In this approach, I use the screen as two of 
your buttons - i.e. double tap screen to toggle rotate translate modes. In my 
code, I guess this double binding could be messing things up. I’m not sure.


Below is the function that controls translate, rotate, and conformation rotate 
for a touch screen. Would you look at and see if you can spot the problem? 
mkResetMin() just resets some page options to default. jms() is a short cut for 
running Jmol script - just saves typing.

This page is now reset to an older version where this all worked. Click the 
move button and the double click instructions direct actions: 
http://chemagic.com/molecules/mini.html


function moveMol(num) {
        mkResetMin();
        jms("set antialiasDisplay false");
        if (num == 1) {
                echo("Click-Drag a model atom to TRANSLATE model. |Dbl-Click to 
change to model rotate mode. |");
                jms('set picking off; set picking ON; set atomPicking true; set 
allowRotateSelected TRUE; set picking dragmolecule;bind "double" "javascript 
moveMol(2)";');
        }
        if (num == 2) {
                echo("Click-Drag a model atom to ROTATE model. |Dbl-Click to 
change to model translate mode. |");
                jms('set picking off; set picking ON;set atomPicking true;set 
picking dragmolecule;set allowRotateSelected TRUE;bind "drag" 
"_rotateselected";bind "double" "javascript moveMol(1)";');
        }
        if (num == 3) {
                bondRotate = true;
                var ecStr = "Click a bond to select bond. Click-Drag in a 
vertical |direction on the left or right of the screen to rotate. |";
                echo(ecStr);
                var scpt = 'set Picking OFF;set Picking ON;set BondPicking 
TRUE;set allowRotateSelected TRUE;unbind "LEFT-DRAG";bind "LEFT-DRAG" "quit;if 
(_X < 250){select WITHIN(BRANCH,{atomno=rot2}, {atomno=rot1})} else {select 
WITHIN(BRANCH,{atomno=rot1}, {atomno=rot2})} rotateSelected {atomno=rot1} 
{atomno=rot2} @{_DELTAY}";hover off;';
                jms(scpt);
        }
}



> On May 8, 2015, at 7:04 AM, Robert Hanson <hans...@stolaf.edu> wrote:
> 
> http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.13_2015.05.08.zip 
> <http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.13_2015.05.08.zip>
> 
> Jmol.___JmolVersion="14.3.13_2015.05.08"
> 
> bug fix: BIND can cause crash
> bug fix: set picking dragMolecule, set picking dragMinimizeMolecule, set 
> picking dragLigand   broken
> bug fix: write "?"  can cause crash when [x] box is pushed on window
> 
> Thanks are to Otis Rothenberger for reminding me about set picking 
> dragMolecule . That is, indeed, a very nice setting that allows very simple 
> dragging and rotation of whole molecules. I have modified the wiki to include 
> that:
> 
> http://wiki.jmol.org/index.php/Mouse_Manual#Allowing_whole-molecule_atom_shifting_and_rotation
>  
> <http://wiki.jmol.org/index.php/Mouse_Manual#Allowing_whole-molecule_atom_shifting_and_rotation>
> 
> and added as section on using bind and unbind to make that work on touch-only 
> interfaces:
> 
> http://wiki.jmol.org/index.php/Mouse_Manual#Whole-molecule_atom_shifting_and_rotation_on_touch-only_interfaces
>  
> <http://wiki.jmol.org/index.php/Mouse_Manual#Whole-molecule_atom_shifting_and_rotation_on_touch-only_interfaces>
> 
> 
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr <http://www.stolaf.edu/people/hansonr>
> 
> 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to