react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

Panning velocity doesn't work if scale is <=1

Open kotcrab opened this issue 2 years ago • 1 comments

Panning velocity doesn't work if scale is <=1, I see it is explicitly disabled in code: https://github.com/prc5/react-zoom-pan-pinch/blob/72fd37e7555f169b2b83b96973cea606f5c96fa3/src/core/pan/velocity.utils.ts#L27 As far I can see the scale itself it's not used for calculating velocity so I'm not sure why there is such limitation.

For the context, I'm using this library to display comic page so it's pretty expected user will want to zoom out to look at the whole page, I also have limitToBounds disabled. It's somewhat weird when you zoom out a little bellow 1x scale and the velocity effect suddenly stops working.

kotcrab avatar Mar 28 '23 16:03 kotcrab

@kotcrab Hey, thanks for the context of your case, I will make this prop adjustable 👍

prc5 avatar Mar 29 '23 07:03 prc5