-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hey @Hyra !!!
I've read your post about PanResponder and I have to say it is amazing.
What I'm not being able to acomplish is to limit the X value between X1 and X2. Lets try to clarify.
When the object is rendered the first time it starts in position 0, so it should never be under zero.
This is what I've tried so far:
onPanResponderGrant: (e, gestureState) => {
let x = (this.state.pan.x._value < 0) ? 0 : this.state.pan.x._value;
this.state.pan.setOffset({ x, y: 0 });
},
Is there any way to do that?
Thanks man!!! I really appreciate your help.
Metadata
Metadata
Assignees
Labels
No labels