jieter / Leaflet-semicircle

Extend Leaflet's circle class to display semicircles.
http://jieter.github.io/Leaflet-semicircle/examples/semicircle.html
MIT License
123 stars 52 forks source link

MouseOver not working properly? #9

Open cariacou opened 7 years ago

cariacou commented 7 years ago

I played around with semicircles and I like it a lot. One issue I noticed though are the popups. While popups on a click work fine, mouse over popup only work for full circles. If the circle is anything but 360 degrees, the only place where the pop up shows when using mouseover is the center of the circle.

"Mouseover" behaves as expected. "Mouseout" seems to be the troublemaker.

Anyone has an idea of what's going on?

// After setting up a semicircle marker, here is the mouseover activation
marker.on('mouseover', function (e) {
    this.openPopup();
});
marker.on('mouseout', function (e) {
    this.closePopup();
});
jieter commented 7 years ago

Can you make a jsfiddle/leaflet-playground demonstrating the issue?