Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onPointerMissed is never called in react-native #3316

Open
krzys-h opened this issue Jul 31, 2024 · 2 comments
Open

onPointerMissed is never called in react-native #3316

krzys-h opened this issue Jul 31, 2024 · 2 comments
Labels
bug Something isn't working react-native to do with react-native

Comments

@krzys-h
Copy link

krzys-h commented Jul 31, 2024

Similar story to #3315 - the code attempts to access e.offsetX here:
https://github.com/pmndrs/react-three-fiber/blob/v8.16.8/packages/fiber/src/core/events.ts#L175-L176
which does not exist on react-native events.

This in turn causes the calculateDistance calculation to always return NaN and if (delta <= 2) to never match.

@CodyJasonBennett CodyJasonBennett added bug Something isn't working react-native to do with react-native labels Aug 10, 2024
@Neosoulink
Copy link

Is there any update about this?
I can fix it

cc: @CodyJasonBennett

@CodyJasonBennett
Copy link
Member

No, generally updates occur naturally in their pertinent issues; you don't have to ping me for an update.

I'm not sure this is exactly true of a diagnosis, or perhaps we're not mutating the right reference here.

function handleTouch(gestureEvent: GestureResponderEvent, type: string): true {
gestureEvent.persist()
canvas.dispatchEvent(
Object.assign(gestureEvent.nativeEvent, {
type,
offsetX: gestureEvent.nativeEvent.locationX,
offsetY: gestureEvent.nativeEvent.locationY,
pointerType: 'touch',
}) as unknown as Event,
)
return true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react-native to do with react-native
Projects
None yet
Development

No branches or pull requests

3 participants