Invert svg gis viewer mouse wheel zoom direction

This way both the svg and OpenLayers viewer behaviors match.

Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
This commit is contained in:
Maximilian Krög 2022-12-19 15:34:53 +01:00
parent a2e2ef9501
commit 26d29d0fa7
No known key found for this signature in database
GPG Key ID: 3C00897BB53AAB9C

View File

@ -171,7 +171,7 @@ function onGisMouseWheel (event) {
event.preventDefault();
var relCoords = getRelativeCoords(event);
var factor = event.deltaY > 0 ? zoomFactor : 1 / zoomFactor;
var factor = event.deltaY > 0 ? 1 / zoomFactor : zoomFactor;
// zoom
scale *= factor;
// zooming keeping the position under mouse pointer unmoved.