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

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



Actually see the page with the div based box markers... 
In some ways the opposite problem as the issue of Vectors --- basically 
the drag events up is registered as the end 
of click event... no matter how much time
has passed from the mousedown event... 


Huey Brantley wrote:
> 
> I may be wrong but I think he is seeing the same issue and me.  I have
> a vector layer (GML) on top of my map. The vector layer has a
> selectFeature control attached to it.  If you click and hold, intended
> to pan, while over the polygon, it won't pan.  Also, if hover is
> activated and a popup is drawn, clicking triggers a error in FireBug.
> 
> On Tue, Sep 16, 2008 at 9:19 AM, Christopher Schmidt
> <crschmidt at metacarta.com> 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
>>
> _______________________________________________
> 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...-tp1091638p1093702.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list