This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Execute quickzoom scale change based on the Y axis delta change #15386
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.
Closes #15219.
Using finger's Y axis position allows for a linear zoom additions/deductions during the quick-zoom changes. This is in contrast to the previously used scale factor, which is based on the current span (distance from the origin) to previous span ratio and increases the closer the finger is to the origin of a gesture because the values are smaller.
The scale ratio based changes are also reliant on series of motion events' values and because the Android framework can skip some events, going back and forth during a quick-zoom might not have resulted in the same transformation. This was reproduced by the round-tripping test introduced in this commit.