stopPropagation/preventDefault on originalEvent

Move stopPropagation/preventDefault to directly target the
originalEvent rather than the mapBrowserEvent.
This commit is contained in:
Greg Gianforcaro
2020-12-09 11:42:53 -05:00
parent 92f93e8e94
commit 9c2b0677fa
5 changed files with 7 additions and 8 deletions
+1 -2
View File
@@ -178,10 +178,9 @@ class MouseWheelZoom extends Interaction {
return true;
}
mapBrowserEvent.preventDefault();
const map = mapBrowserEvent.map;
const wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);
wheelEvent.preventDefault();
if (this.useAnchor_) {
this.lastAnchor_ = mapBrowserEvent.coordinate;