infinite-viewer icon indicating copy to clipboard operation
infinite-viewer copied to clipboard

Scroll wheel zoom accuracy error

Open iDerekLi opened this issue 3 years ago • 5 comments

There is a strange zoom accuracy problem when using the mouse wheel, but there is no such problem when using the touchpad.

MouseWheel image

TouchPad image

iDerekLi avatar Aug 16 '21 02:08 iDerekLi

@iDerekLi

It is the same as the difference in the amount of wheel set for each mouse.

I'll add maxWheelDistance prop

daybrush avatar Nov 15 '21 17:11 daybrush

@iDerekLi

infinite-viewer's new version is released.

you can use maxWheelPinch prop.

maxWheelPinch={2}

daybrush avatar Nov 17 '21 15:11 daybrush

Hey @daybrush,

I ran into the same issue as @iDerekLi, the scale value seems to be reasonable when zooming in (2) but when zooming out it goes to a really small value (0.00001), which makes the elements to go into nano size instantly.

It is happening in the official example using ctrl+wheel. I can't get it to work even by changing the new prop you added. Any idea how to fix this?

pgrodrigues90 avatar Sep 16 '22 15:09 pgrodrigues90

@pgrodrigues90

Fixed official demos.

         zoomRange: [0.1, 10],
         maxPinchWheel: 10,

daybrush avatar Sep 18 '22 01:09 daybrush

@pgrodrigues90

Fixed official demos.

         zoomRange: [0.1, 10],
         maxPinchWheel: 10,

It's working now, thanks

pgrodrigues90 avatar Sep 19 '22 09:09 pgrodrigues90