ssanjun / react-swing

react-swing is a React component for implementing swing
http://ssanjun.github.io/examples/react-swing/
Other
40 stars 18 forks source link

Swipe top throw card out of viewport #13

Closed dmoli closed 5 years ago

dmoli commented 7 years ago

Hi @ssanjun!

Hey, in your example when I swipe top, the card is keeping in the viewport. It is perfect!

But in the example to download, when I swipe top, the card is thrown out to the viewport...

screen shot 2017-08-16 at 4 29 48 pm

How can I solve this?

Really, thank you very much!

ssanjun commented 7 years ago

Hi @skumblue it is setting of Swing component. Check this section if you want to allowed specific direction then you will setting 'allowedDirections' value in config object.

<Swing
    config={{
        allowedDirections: [Swing.DIRECTION.LEFT, Swing.DIRECTION.RIGHT]
    }}
>

it will be work. Thanks!

dmoli commented 7 years ago

@ssanjun my friend, thank you very much!