From 5555eabe903654424c5c0f3e0feca77f75c723c7 Mon Sep 17 00:00:00 2001 From: Thomas Aulinger <49945713+taulinger@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:21:15 +0100 Subject: [PATCH] Revert "pan map on pressing mouse wheel" (#2794) This reverts commit 90e0d348be814b49786acba2dd9554446e49b6bc. --- src/modules/olMap/components/OlMap.js | 7 +------ test/modules/olMap/components/OlMap.test.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/modules/olMap/components/OlMap.js b/src/modules/olMap/components/OlMap.js index ad05265a2f..f230da6bfe 100644 --- a/src/modules/olMap/components/OlMap.js +++ b/src/modules/olMap/components/OlMap.js @@ -7,7 +7,7 @@ import olCss from 'ol/ol.css'; import css from './olMap.css'; import { Map as MapOl, View } from 'ol'; import { defaults as defaultControls, ScaleLine } from 'ol/control'; -import { defaults as defaultInteractions, PinchRotate, DragPan } from 'ol/interaction'; +import { defaults as defaultInteractions, PinchRotate } from 'ol/interaction'; import { removeLayer } from '../../../store/layers/layers.action'; import { changeLiveCenter, changeLiveRotation, changeLiveZoom, changeZoomCenterAndRotation } from '../../../store/position/position.action'; import { $injector } from '../../../injection'; @@ -171,11 +171,6 @@ export class OlMap extends MvuElement { }).extend([ new PinchRotate({ threshold: this._mapService.getMinimalRotation() - }), - new DragPan({ - condition: (mapBrowserEvent) => { - return mapBrowserEvent.originalEvent.isPrimary && mapBrowserEvent.originalEvent.button < 2; - } }) ]) }); diff --git a/test/modules/olMap/components/OlMap.test.js b/test/modules/olMap/components/OlMap.test.js index 2f517e4989..61f2bb4378 100644 --- a/test/modules/olMap/components/OlMap.test.js +++ b/test/modules/olMap/components/OlMap.test.js @@ -267,7 +267,7 @@ describe('OlMap', () => { //all default controls are removed, ScaleLine control added expect(element._map.getControls().getLength()).toBe(1); //all interactions are present - expect(element._map.getInteractions().getLength()).toBe(10); + expect(element._map.getInteractions().getLength()).toBe(9); expect(element._map.moveTolerance_).toBe(1); expect(mapServiceSpy).toHaveBeenCalled(); });