Changing the scale step for double click and mouse wheel events.
This commit is contained in:
parent
4204168a3f
commit
88755e35f9
|
@ -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 },
|
||||
})
|
||||
);
|
||||
|
|
|
@ -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 },
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue