Fix issue where map could pan when moving the mouse without a down pointer

This commit is contained in:
Quincy Morgan
2020-03-10 11:52:48 -07:00
parent 73d68b7a65
commit 284ff28961

View File

@@ -267,6 +267,9 @@ export function utilZoomPan() {
function pointermove() {
if (!this.__zooming) return;
// don't pan if no pointer is down, e.g. after a down mouse was moved off the map and released
if ('buttons' in d3_event && !d3_event.buttons) return;
var loc = d3_mouse(this);
var g = gesture(this, arguments);