Commit b79e369e authored by Sarath's avatar Sarath

Drag on map disabled when scrolling on sidebar

parent e3cc3355
Pipeline #3230187 passed with stage
in 13 seconds
......@@ -94,6 +94,16 @@ info.update = function (props, stateHTML) {
info.addTo(map);
// Avoid scrolling map when scrolling in info box
info.getContainer().addEventListener('mouseover', function () {
map.dragging.disable();
});
// Re-enable dragging when user's cursor leaves the element
info.getContainer().addEventListener('mouseout', function () {
map.dragging.enable();
});
function getColor(stateName) {
var color = (shutdowns.stateWise[stateName])? shutdowns.colors[shutdowns.stateWise[stateName].length]: defaultColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment