Adds a mouseintent event that guess user intentions to hover layers!
HTML JavaScript
Latest commit 4d282ae Sep 12, 2016 @SBats SBats Clean code and follow linter


Aiming is neater than clicking !

This plugins adds a new event mouseintent, that differs from mouseover since it reflects user intentions to aim a particular layer.

Observe the difference with the online demo.


    var marker = L.marker([lat, lng]).addTo(map);

    marker.on('mouseintent', function (e) {
        // User meant it !

( works with markers and vectorial layers )


  • intentDuration : default is 300ms (See demo.)


Makina Corpus