mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 16:08:43 +02:00
By default don't show marker cluster outlines while in a zoom animation, in firefox you could end up with random outlines showing during a zoom which looked dumb
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
|
||||
bindEvents: function (map, markerClusterGroup) {
|
||||
var me = this;
|
||||
var inZoomAnimation = false;
|
||||
|
||||
map.on('zoomstart', function () { inZoomAnimation = true; });
|
||||
map.on('zoomend', function () { inZoomAnimation = false; });
|
||||
|
||||
|
||||
//Zoom on cluster click or spiderfy if we are at the lowest level
|
||||
markerClusterGroup.on('clusterclick', function (a) {
|
||||
@@ -29,6 +34,9 @@
|
||||
|
||||
//Show convex hull (boundary) polygon on mouse over
|
||||
markerClusterGroup.on('clustermouseover', function (a) {
|
||||
if (inZoomAnimation) {
|
||||
return;
|
||||
}
|
||||
if (me._shownPolygon) {
|
||||
map.removeLayer(me._shownPolygon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user