You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are 2 functions that are called before user interaction is handled:
-onTouch
-beforeWheel
But I find the API of these confusing, since onTouch is only meant to return 'false' if you want to propagate the touches, while onBeforeWheel is only meant to return 'true' if you don't want the library to handle the event.
I'd propose to unify these and extend them to each of these listeners:
-beforeTouch
-beforeWheel
-beforeMouseDown
-beforeDoubleClick
-beforeKeyDown
Each of these could then return: { ignore: boolean, propagate: boolean }.
This would also make it easier to for example allow drag/drop within the panzoom region.
I could make a PR for this, but since it'd mean a breaking change I'd rather get your thoughts on this first.
The text was updated successfully, but these errors were encountered:
Currently there are 2 functions that are called before user interaction is handled:
-onTouch
-beforeWheel
But I find the API of these confusing, since onTouch is only meant to return 'false' if you want to propagate the touches, while onBeforeWheel is only meant to return 'true' if you don't want the library to handle the event.
I'd propose to unify these and extend them to each of these listeners:
-beforeTouch
-beforeWheel
-beforeMouseDown
-beforeDoubleClick
-beforeKeyDown
Each of these could then return: { ignore: boolean, propagate: boolean }.
This would also make it easier to for example allow drag/drop within the panzoom region.
I could make a PR for this, but since it'd mean a breaking change I'd rather get your thoughts on this first.
The text was updated successfully, but these errors were encountered: