Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was having an issue panning with two fingers. If I drag my fingers side by side (like riding inline skates) it pans as expected. But if I drag my fingers one in front of the other (like riding a skateboard) it would cause the screen to zoom, even though I'm not changing the distance between my fingers.
I figured out that the behavior is caused by calling "dragging()" multiple times in a single frame. The browser usually calls the pointer move event for each finger at around the same time. This means the position data for both fingers is only in-sync for the second call, the first call is using out-of-date pointer position for the other finger.
My solution is to add a _dragNeedsUpdate flag to ensure that dragging() would only be called once per frame.
Also I had to add tslib to the dev dependencies in order to run 'npm run build', so that's here as well.