Changing the scale step for double click and mouse wheel events.

This commit is contained in:
vdv committed 2022-09-14 20:41:31 +02:00
1 parent 4204168a3f
commit 88755e35f9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -95,7 +95,7 @@ const MouseHandler: react.FC<MouseHandlerProps> = (
genericHandler(event); genericHandler(event);
dispatch( dispatch(
mapActions.scale({ mapActions.scale({
factor: 2, factor: Math.SQRT2,
center: { x: event.pageX, y: event.pageY }, center: { x: event.pageX, y: event.pageY },
}) })
); );
+1 -1
View File
@@ -47,7 +47,7 @@ const WheelHandler: react.FC<WheelHandlerProps> = (
) { ) {
dispatch( dispatch(
mapActions.scale({ mapActions.scale({
factor: event.deltaY > 0 ? 2 : 0.5, factor: event.deltaY > 0 ? Math.SQRT2 : Math.SQRT1_2,
center: { x: event.pageX, y: event.pageY }, center: { x: event.pageX, y: event.pageY },
}) })
); );