Resolve some test failures

This commit is contained in:
Greg Gianforcaro
2020-12-09 01:17:19 -05:00
parent 99f23caf03
commit 92f93e8e94
3 changed files with 3 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ class KeyboardPan extends Interaction {
const delta = [deltaX, deltaY];
rotateCoordinate(delta, view.getRotation());
pan(view, delta, this.duration_);
mapBrowserEvent.preventDefault();
mapBrowserEvent.originalEvent.preventDefault();
stopEvent = true;
}
}

View File

@@ -81,7 +81,7 @@ class KeyboardZoom extends Interaction {
charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;
const view = map.getView();
zoomByDelta(view, delta, undefined, this.duration_);
mapBrowserEvent.preventDefault();
mapBrowserEvent.originalEvent.preventDefault();
stopEvent = true;
}
}

View File

@@ -139,7 +139,7 @@ class PointerInteraction extends Interaction {
if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {
this.handleDragEvent(mapBrowserEvent);
// prevent page scrolling during dragging
mapBrowserEvent.preventDefault();
mapBrowserEvent.originalEvent.preventDefault();
} else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {
const handledUp = this.handleUpEvent(mapBrowserEvent);
this.handlingDownUpSequence =