[OpenLayers-Users] disable double click
Lennox Antoine
lxnyce at gmail.com
Tue Jul 20 09:07:54 EDT 2010
You can also register a click handler, and stop the double click event from
propagating.
http://openlayers.org/dev/examples/click.html
Here is a quick example I modified from code :
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control,
{
defaultHandlerOptions: {
'single': true,
'double': true,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this, {
'dblclick': function(e){
this.handler.stopDouble = true;
}
}, this.handlerOptions
);
}
});
Lennox
On Tue, Jul 20, 2010 at 9:01 AM, Piero Campa <piero.campa at gmail.com> wrote:
>
> Sorry, I made a mistake in the javascript include.
> It works.
> Piero
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/disable-double-click-tp1824832p5316506.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100720/e5d396e0/attachment.html
More information about the Users
mailing list