Re: [Jmol-users] No atom picking with modifier keys

2017-07-13 Thread Rolf Huehne

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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-10 Thread 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 
+ ")";

  }
}

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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-06 Thread 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*

On Thu, Jul 6, 2017 at 4:13 PM, Rolf Huehne 
wrote:

> Am 06.07.17 um 16:26 schrieb Robert Hanson:
>
>> I'm not getting any of that to work. Are you?
>>
>> Yes, all five combinations work for me both in Jmol 14.18.1 Java and
> Javascript on MacOS 10.11.6 (El Capitan) in Safari 9.1.2 and Waterfox
> 53.0.3.
>
> Regards,
> Rolf
>
> On Wed, Jul 5, 2017 at 11:08 PM, Rolf Huehne > > wrote:
>>
>> Am 06.07.17 um 05:06 schrieb Robert Hanson:
>>
>> Rolf, what is the expected action of
>>
>> set pickingStyle select extendedSelect
>>
>> ?
>>
>> It is described in the scripting documentation:
>>
>> left-click  selects just that group, like rasmol;
>> shift-left-clicktoggles the group selected/not selected;
>> alt-left-click  appends the group to the current selection;
>> alt-shift-left-clickremoves the group from the current
>> selection;
>> left-click off modelexecutes (select none);
>>
>>
>> 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
>> 
>>
>>
>>
>>
>> --
>> Robert M. Hanson
>> Professor of Chemistry
>> St. Olaf College
>> Northfield, MN
>> http://www.stolaf.edu/people/hansonr
>>
>>
>> If nature does not answer first what we want,
>> it is better to take what answer we get.
>>
>> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>>
>>
>>
>> 
>> --
>> 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
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-06 Thread Rolf Huehne

Am 06.07.17 um 16:26 schrieb Robert Hanson:

I'm not getting any of that to work. Are you?

Yes, all five combinations work for me both in Jmol 14.18.1 Java and 
Javascript on MacOS 10.11.6 (El Capitan) in Safari 9.1.2 and Waterfox 
53.0.3.


Regards,
Rolf


On Wed, Jul 5, 2017 at 11:08 PM, Rolf Huehne > wrote:

Am 06.07.17 um 05:06 schrieb Robert Hanson:

Rolf, what is the expected action of

set pickingStyle select extendedSelect

?

It is described in the scripting documentation:

left-click  selects just that group, like rasmol;
shift-left-clicktoggles the group selected/not selected;
alt-left-click  appends the group to the current selection;
alt-shift-left-clickremoves the group from the current
selection;
left-click off modelexecutes (select none);


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





--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



--
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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-06 Thread Robert Hanson
I'm not getting any of that to work. Are you?

On Wed, Jul 5, 2017 at 11:08 PM, Rolf Huehne 
wrote:

> Am 06.07.17 um 05:06 schrieb Robert Hanson:
>
>> Rolf, what is the expected action of
>>
>> set pickingStyle select extendedSelect
>>
>> ?
>>
> It is described in the scripting documentation:
>
> left-click  selects just that group, like rasmol;
> shift-left-clicktoggles the group selected/not selected;
> alt-left-click  appends the group to the current selection;
> alt-shift-left-clickremoves the group from the current
> selection;
> left-click off modelexecutes (select none);
>
>
> 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
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-05 Thread Rolf Huehne

Am 06.07.17 um 05:06 schrieb Robert Hanson:

Rolf, what is the expected action of

set pickingStyle select extendedSelect

?

It is described in the scripting documentation:

left-click  selects just that group, like rasmol;
shift-left-clicktoggles the group selected/not selected;
alt-left-click  appends the group to the current selection;
alt-shift-left-clickremoves the group from the current selection;
left-click off modelexecutes (select none);

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


Re: [Jmol-users] No atom picking with modifier keys

2017-07-05 Thread Robert Hanson
Rolf, what is the expected action of

set pickingStyle select extendedSelect

?

On Tue, Jul 4, 2017 at 8:29 AM, Rolf Huehne 
wrote:

> Hi Bob,
>
> I would like to implement my own atom pick mode, providing flexibility by
> using modifier keys like (SHIFT, ALT).
>
> In the standard mode, after the commands
> "set picking ATOM; set PickingStyle SELECT extendedSelect",
> atoms can be picked with one or more modifier keys pressed.
>
> But after the command "set picking on" and setting a callback with the
> command
> 'set pickCallback "jmolscript: pickAction()'
> the callback function 'pickAction' is only called in Jmol 14.18.1 if no
> modifier key is pressed.
>
> Q: Is this a bug or unfortunately the intended behaviour?
>
> 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
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
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