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

Huey Brantley hpbrantley at gmail.com
Tue Sep 16 12:16:33 EDT 2008


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
>



More information about the Dev mailing list