Skip to content

geoloep/Leaflet.ClickTolerance

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published