Add options to disable mouse wheel zoom and single touch panning
Hello,
This PR adds two new options: disableMouseWheelZoom and disableSingleTouchPan.
The purpose of these options are to allow a user to scroll past a react-map-interaction instance more easily, without disabling more functionality than necessary.
These options are different than the existing disableZoom and disablePan options in the following ways:
-
disableMouseWheelZoomwill still allow zooming with the control buttons or two fingers on a touch device. -
disableSingleTouchPanstill allows panning with the mouse or with two fingers on a touch device.
I also took the liberty to rewrite the example page to make it a bit easier to test the different options.
Thanks for the PR. I'll need to see how this behaves locally, first. We may want to consider a better way of handling all of these options before tacking on two more. The code is starting to be full of these checks in various places which makes the core logic harder to grasp.
Also, I'd prefer to add tests, linting, coverage, etc. before adding more features (and possible regressions). I'll be working on that shortly. With more people using the lib, and the subtle bugs that can pop up with touch/drag support, I'd like to have strong test coverage before making addtions.