woutervh-/react-pan-and-zoom-hoc

Bug: Touch behavior differs from mouse behavior

blaues0cke opened this issue · 3 comments

I just found that there is a difference in using react-pan-and-zoom-hoc with mouse or with touch. As you can see in this video, everything works well when using the mouse. But when touch is used, the movement is kinda "reset". Also it seems that a similar issue like https://github.com/woutervh-/react-pan-and-zoom-hoc/issues/17 still exists?

Screen Recording 2019-08-21 at 16 06 59 2019-08-21 16_10_09

How bizarre, every time normalizeTouchPosition is used it is first checked if the length of the touches array is >= 1... maybe there is no first touch (index 0) but there is one in index 1 or more? I will have to look into this... thanks for the report.

Thanks @blaues0cke

I found the error, it was introduced in the issue you mentioned #17
It's been patched and released as version 2.1.7 :)

Thank you very much! Can confirm that 2.1.7 works like a charm! :-)