react-swipeable-views icon indicating copy to clipboard operation
react-swipeable-views copied to clipboard

swipe animation is very not smooth when axis is `y`

Open geminiyellow opened this issue 6 years ago • 2 comments

Current Behavior

ok, here is what i meet: axis: x is very smooth, and working well. but when the page show on orientation iPhone, i change it to 'y'. and then, the swipe looks very bad. as the following gif shown.

axis

touch any part of slide will cause unexpected swipe. anybody know what was happend?

Steps to Reproduce (for bugs)

my code looks like this:


const Virtualize = virtualize(SwipeableViews);
const slideRenderer = ({ index, key }) => (
    <View key={key} style={{ padding: 10, height: '100%' }}>
      <Text>{`${index} - ${key}`}</Text>
    </View>
);
render() {
    const { window } = this.props;
    const { width, height } = window;
    const horizontal = width < height;
    const stylePadding = (
      horizontal
        ? {
          paddingLeft: 40,
          paddingRight: 40,
        }
        : {
          paddingTop: 40,
          paddingBottom: 40,
        }
    );
    return ( 
          <Virtualize
            resistance
            style={{ flex: 1, ...stylePadding }}
            containerStyle={{ height: '100%' }}
            slideStyle={{ height: '100%' }}
            axis={horizontal ? 'x' : 'y'}
            slideRenderer={slideRenderer}
          />
    )
}

Your Environment

Tech Version
"react-swipeable-views": "^0.13.0",
"react-swipeable-views-core": "^0.13.0",
"react-swipeable-views-native": "^0.13.1",
"react-swipeable-views-utils": "^0.13.0",
"react": "^16.6.0",
"react-native-web": "^0.9.5",

geminiyellow avatar Nov 09 '18 06:11 geminiyellow

and the flat ignoreNativeScroll: true cannot fix this .

geminiyellow avatar Nov 09 '18 07:11 geminiyellow

@oliviertassinari hey sir, could you help me?

geminiyellow avatar Dec 04 '18 03:12 geminiyellow