BetterTyped/react-zoom-pan-pinch

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

Opened this issue · 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.

prc5 commented

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