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.
Adds
previousPositionA
andpreviousPositionB
to thergestures.h
'sTouch
struct to keep track of the previous Pinch positions. Didn't want to try to reusedownPositionA
anddownPositionB
for this case to not break the other gestures that use them and are working properly.Assign the values of
previousPositionA
andpreviousPositionB
during theevent.touchAction == TOUCH_ACTION_DOWN
instead, so they can exist before theevent.touchAction == TOUCH_ACTION_MOVE
.Removes the now no longer used
GESTURES.Touch.downPositionA
andGESTURES.Touch.downPositionB
assigns inside theevent.touchAction == TOUCH_ACTION_MOVE
.Changes the
MINIMUM_PINCH
check to now use thepreviousPositionA
andpreviousPositionB
.Changes the criteria to define if it's
GESTURE_PINCH_IN
orGESTURE_PINCH_OUT
by checking the distance betweenpreviousPosition
andmoveDownPosition
. IfpreviousPosition
distance is larger thanmoveDownPosition
distance, then it's aGESTURE_PINCH_IN
, else it's aGESTURE_PINCH_OUT
.Fixes #1963.