Changing the scale step for double click and mouse wheel events.
This commit is contained in:
1 parent
4204168a3f
commit
88755e35f9
2 files changed
+2
-2
No files matched your search
@@ -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 },
|
||||
})
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user