[OpenLayers-Dev] Event trapping by dragging... on Boxes...

Lance Dyas lancelot at inetnebr.com
Mon Sep 15 22:11:32 EDT 2008


Christopher Schmidt wrote:
> On Mon, Sep 15, 2008 at 07:43:57PM -0500, Lance Dyas wrote:
>   
>> Im having some difficulties with the drag action fires a click event
>> if it ends on a box... so my user intending to drag the view gets a 
>> click event?
>> if his mouse down and mouse up are both over the box.
>>
>> You can see the effect in the standard boxes examples
>> it isnt much of a problem if your click event is innocuous
>> like changing the box color... but for something like opening
>> a popup or page change or something more real
>> this is a very bad thing.
>>     
>
> Use a Click Handler.
>   
I am feeling dense today.. so maybe its obvious  but how do I use a 
ClickHandler
 on something other than the map itself (the boxes in the basic example 
would be nice)?

Do I need to trap the event on the map and run through the boxes to fire 
click event
based on a bounds test of those?

If you have to go through hoops to make this function in a more
natural way it might be nice to have an example of it.

 



More information about the Dev mailing list