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

Garthan lancelot at inetnebr.com
Tue Sep 16 16:51:51 EDT 2008


I figured the reference to the standard boxes example was pretty obvious 
http://www.openlayers.org/dev/examples/boxes.html


Christopher Schmidt-2 wrote:
> 
> On Mon, Sep 15, 2008 at 09:11:32PM -0500, Lance Dyas wrote:
>> 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.
> 
> Er, I don't understand. What is your click event registered on? 'Boxes' in
> OpenLayers dont' have an OpenLayers.Events class attached to them, so I
> don't understand how you could be registering a click event on them in
> OpenLayers-land...
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> 

-- 
View this message in context: http://n2.nabble.com/Event-trapping-by-dragging...--on-Boxes...-tp1091638p1093684.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list