[OpenLayers-Dev] deactivating other handlers
crschmidt at metacarta.com
Thu Oct 25 08:59:32 EDT 2007
On Thu, Oct 25, 2007 at 10:57:37AM +0200, Bart van den Eijnden (OSGIS) wrote:
> Hi devs,
> I've written a FeatureInfo Handler, which only uses click. However, the
> DragPan handler for instance is still active.
> What is the best way to deactivate these other handlers?
> Ofcourse I can also implement mousedown etc. and not let the event
> propagate, but that seems a bit cumbersome.
> Is there a way to make a Handler exclusive, or to remove all other handlers
> from the map?
Controls should use registerPriority when registering events on activate
-- registerPriority says 'me first!'. So, even though dragPan would get
the event, if you registerPriority, you'll get it first, and then stop
it so that dragPan doesn't get it.
If that doesn't work somewhere, then it would be good to know, but I
think it should.
More information about the Dev