Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Build Status

Leaflet.ClickTolerance

Adds a clickTolerance option to canvas powered layers. Increases the clickable area of vector layers beyond their visible extent. Useful when the stroke width of your vector layer is to narrow to create an usable clickable area.

Setup

Standalone

Include the javascript file on your page after Leaflet.

Node

Require the leaflet-clicktolerance package.

Usage

This plugin extends the Path options with a new option "clickTolerance". Set this option for layers you want to increase the clickable area of.

var layer = L.polyline([[0,0], [0,10]], {
    clickTolerance: 10,
});

On touch enabled browser an additional tolerance is automatically added.

About

Adds clickTolerance option to canvas powered layers

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.