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

This commit is contained in:
Eric van der Vlist 2022-09-14 20:41:31 +02:00
parent 4204168a3f
commit 88755e35f9
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ const MouseHandler: react.FC<MouseHandlerProps> = (
genericHandler(event);
dispatch(
mapActions.scale({
factor: 2,
factor: Math.SQRT2,
center: { x: event.pageX, y: event.pageY },
})
);

View File

@ -47,7 +47,7 @@ const WheelHandler: react.FC<WheelHandlerProps> = (
) {
dispatch(
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 },
})
);