react-native-web-swiper
react-native-web-swiper copied to clipboard
Bouces disable?
How to disable this stretched animation?

Do you have a reproducible example? @Victorcassiano
Do you have a reproducible example? @Victorcassiano
the gif shows the screen stretching when dragging, there would be no way to remove that?
Do you have a reproducible example? @Victorcassiano
the gif shows the screen stretching when dragging, there would be no way to remove that?
sorry, I didn't really get what was the issue
@jarvisluong
@Victorcassiano wanna to disallow gestures < 0
and > width
.
I think it's some additional logic here https://github.com/reactrondev/react-native-web-swiper/blob/6d007d23ccefd33936b0a7fe90d66f58142c2a03/src/Swiper.js#L110-L112
something like this:
var allow = false;
const changeRequest = vertical ? gestureState.dy : gestureState.dx;
// if not is last slide -> allow move right // if not is first slide -> allow move left
if ((activeIndex + 1 < slidesCount && changeRequest > 0) || (activeIndex > 0 && changeRequest < 0)) {
allow = Math.abs(changeRequest) > minDistanceToCapture;
}
I guess what we can do is to expose onMoveShouldSetPanResponderCapture
and let user override that logic if needed. How do you think about this approach? @oxyii
@jarvisluong I really don't care ))) I don't even work with react anymore. I just explained what @Victorcassiano want.