Am 10.07.17 um 19:16 schrieb Rolf Huehne:
Am 07.07.17 um 04:37 schrieb Robert Hanson:
should be working  now -- check what I just released today. I was having
trouble because I missed this in my own documentation: /In the
explanations given below, it is presumed that we have *set picking
SELECT GROUP*/

I checked 14.20.1 today but nothing has chnged.

My 'pickAction' function is shown below and only prints anything if no
modifier key is pressed while the left mouse button is pressed:

function pickAction() {
  var modifiers       = "" + _mouseModifiers;

  if (_atompicked >= 0) {
    var pickedAtomIndex = _atompicked;
    var pickedNode      = {atomindex=@pickedAtomIndex};

    var modifierToString = {};
    modifierToString["16"] = "NONE";
    modifierToString["17"] = "SHIFT";
    modifierToString["24"] = "ALT";
    modifierToString["25"] = "ALT-SHIFT";

    var modifierString = "";
    if (modifierToString[modifiers] != "") {
      modifierString = modifierToString[modifiers];
    }
    print "index=" + pickedAtomIndex + "  modifiers=" +
modifierToString[modifiers] + " (" + modifiers + ")";
  } else {
    print "modifiers=" + modifierToString[modifiers] + " (" + modifiers
+ ")";
  }
}

I have checked version 14.20.2. Now the pickCallback function is called also when a modifier key is pressed, but the read-only variable '_mouseModifiers' always contains the value '16' (no modifier).

Also after the commands
"set picking ATOM; set PickingStyle SELECT extendedSelect"
the modifier keys don't work any more as described in the documentation. Clicking at an atom now always selects ony the clicked atom. And after registering additionally a pickCallback function, it is always called twice after a single click.

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

Reply via email to