[OpenLayers-Users] How to access mouse modifier during "featureselected"

Marcel Ruff mr at marcelruff.info
Wed Feb 10 06:10:10 EST 2010


Ivan Grcic schrieb:
> Oh yes, as i see feature handler doesnt have same evt attribs as click
> handler does... so you need to catch click handler of feature handler
> somehow :|
>   
Yes, this is all I get, so no chance to detect which mouse button was 
pressed:

  evt.element
  evt.feature
  evt.object
  evt.type="featureselected"

If I use "click" I need to somehow compute myself which feature was hit ...

There is no simple solution available?

Thanks
Marcel
> On Mon, Feb 8, 2010 at 7:46 AM, Max Weidemann <max.weidemann at freenet.de> wrote:
>   
>> Hello Marcel,
>>
>> Try this code too find out if it is a right click.
>>
>> if(((evt.which) && (evt.which == 3)) ||
>>                ((evt.button) && (evt.button == 2))){
>> //your Code
>> }
>>
>> cheers
>> Max
>>     



More information about the Users mailing list