On Wednesday, July 8, 2009, Andre Pereira de Matos <andre.ma...@co.sapo.pt> wrote: > Hi, > > And thanks for your reply ;) > > Before send the mail, I have tried to set that property to false and the Box > handler has stop working.
Have you changed prototype.stopDown as I mentioned if my previous email? > I pressed shift + mouse drag, and when you are dragging the box the map moves > too. > > Is this a bug? Is it supposed? The ZoomBox control uses a Box handler internally, which itself uses a Drag handler. If that Drag handler's stopDown property is false then the Drag handler used in the PanZoom control's Drag handler also receives the mousedown event, which explains why the map moves. > > Cheers! > > André Matos > > -----Original Message----- > From: Eric Lemoine [mailto:eric.lemo...@camptocamp.com] > Sent: quarta-feira, 8 de Julho de 2009 20:03 > To: Andre Pereira de Matos > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] left click handler at OpenLayers.Handler.Drag > > On Wednesday, July 1, 2009, Andre Pereira de Matos > <andre.ma...@co.sapo.pt> wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hi List, >> >> >> >> I am developping a site using OpenLayers >> 2.7 (I know, I have to upgrade it to 2.8 :p, but for now I am using 2.7). >> >> >> >> So, in the class OpenLayers.Handler.Drag you >> are using an handler for mousedown events (method: mousedown), and you are >> returning false if it is a left mousedown, is there any reason to do that? I >> tried >> to return true and the behavior apparenty doesn't chang, it still works. >> >> >> >> >> >> At some point of my application I would >> like to be notified when a left mousedown occurs, could I return true in that >> method? Is there a patch to fix that? > > Hi, and sorry if this answer comes late. Yes, by default the drag > handler's mousedown method returns false. You can change that by > setting stopDown to false in the drag handler instance. If you want to > have that in every drag handler, even those that you don't create > yourself, you can do: > > OpenLayers.Handler.Drag.prototype.stopDown = false; > > soon enough if you application code. > > Cheers, > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemo...@camptocamp.com > http://www.camptocamp.com > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users