Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ open class GestureHandler<ConcreteGestureHandlerT : GestureHandler<ConcreteGestu
x = adaptedTransformedEvent.x
y = adaptedTransformedEvent.y
numberOfPointers = adaptedTransformedEvent.pointerCount
val wasWithinBounds = isWithinBounds
isWithinBounds = isWithinBounds(view, x, y)
if (shouldCancelWhenOutside && !isWithinBounds) {
if (state == STATE_ACTIVE) {
Expand All @@ -386,6 +387,8 @@ open class GestureHandler<ConcreteGestureHandlerT : GestureHandler<ConcreteGestu
sourceEvent.action == MotionEvent.ACTION_HOVER_EXIT
) {
onHandleHover(adaptedTransformedEvent, adaptedSourceEvent)
} else if (sourceEvent.action == MotionEvent.ACTION_MOVE && state == STATE_ACTIVE && wasWithinBounds != isWithinBounds) {
orchestrator!!.onHandlerStateChange(this, state, state)
} else {
onHandle(adaptedTransformedEvent, adaptedSourceEvent)
}
Expand Down
2 changes: 1 addition & 1 deletion apple/RNGestureHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ - (void)sendEventsInState:(RNGestureHandlerState)state
forViewWithTag:(nonnull NSNumber *)reactTag
withExtraData:(RNGestureHandlerEventExtraData *)extraData
{
if (state != _lastState) {
if (state != _lastState || state == RNGestureHandlerStateActive) {
// don't send change events from END to FAILED or CANCELLED, this may happen when gesture is ended in `onTouchesUp`
// callback
if (_lastState == RNGestureHandlerStateEnd &&
Expand Down
Loading