Allows Leaflet layers to fire 'singleclick' events
Switch branches/tags
Clone or download
Pull request Compare This branch is 18 commits ahead, 4 commits behind Outdooractive:gh-pages.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
bower.json
index.html
singleclick.js

README.md

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/