[OpenLayers-Users] avoid hover selection with shiftKey
Eric Lemoine
eric.c2c at gmail.com
Fri Jun 13 01:03:14 EDT 2008
On Thu, Jun 12, 2008 at 4:45 PM, G. Allegri <giohappy at gmail.com> wrote:
> Hello again,
> I still haven't a good control over OL...
> I need to use the SelectFeature control with the hover switch active,
> but I want to deactivate it when shifKey is pressed (to allow
> zooming).
> I think I should extend the overFeature() method declared inside the
> OL.Control.SelectFeature. I don't want to put the hands in the source,
> so what's the best way to do it outside of it?
> During the control instantiation/initialization? Should I use
> Util.Extend (somehow)?
> I need to understand better OO programming in OL... I want to use this
> simple case to improve my knowledget. Would you help me?
Hi, first thing you can try is:
selectFeatureControl.handler.stopDown = false;
right after the activation of the select feature control. This should
prevent the select feature control from stopping mousedown events
which the zoom box control needs. Note that this will not disable
feature selection.
--
Eric
More information about the Users
mailing list