Make camera controls more sensitive to trackpad pinch #7348
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.
On browsers unfortunately trackpad pinch-zoom is sent over as a wheel event. However, the magnitude of these events are decidedly smaller in practice, leading to very unsatisfying pinch zooming. Multiplying deltas by 10 when they are less than 25 in my testing is an effective fix for this.
A more complete solution can be implemented by tracking the state of the ctrl key vs whether it was pressed beforehand in a separate keydown handler, but it is more onerous and this seems to work alright in the interim.
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.