RyoSogawa / react-resizable-layout

Headless React component and hook for resizable layout.
https://www.npmjs.com/package/react-resizable-layout
MIT License
90 stars 14 forks source link

Move to `PointerEvent`s to support touch screens #12

Closed KaappoRaivio closed 1 year ago

KaappoRaivio commented 1 year ago

This package is otherwise awesome, but it lacks support for pointing devices other than mice. As the PointerEvent API is supported practically everywhere, it's possible to use it as a direct, drop-in replacement for MouseEvent.

This commit includes all the necessary changes to implement the change. I have tested the implementation with my phone (touch) and computer (mouse).

KaappoRaivio commented 1 year ago

Yeah sorry about the package.json changes, accidentally pushed them to the PR when I only meant to publish my own version of the package to npm so that I can use the changes in my other project before you release the new version