Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Latest commit

 

History

History
24 lines (13 loc) · 691 Bytes

File metadata and controls

24 lines (13 loc) · 691 Bytes

Deprecated

This repository is no longer maintained and is deprecated. Please be aware that it may not work with the latest versions of its dependencies.


Leaflet.singleclick

This plugin extends L.Evented to fire the singleclick event. A singleclick happens when clicking on something but not double-clicking for 500msec.

The timeout can be configured by setting the singleClickTimeout option on the relevant L.Evented, like so:

marker.options.singleClickTimeout = 250;
marker.on('singleclick', function(ev){ ... } );

Works with Leaflet 1.0.0-beta1 and greater. Does not work with 0.7.x.

Live example

http://mazemap.github.io/Leaflet.singleclick/