Jump to content
Search Community

ThrowPropsPlugin, swiping instead of dragging

Juno911 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Please see the codepen example. It has a container width of 1300px. Bad for mobile devices. But cards array needs width, to throw the card to. We want a fullwidth (100%) picture which can anyway slide to the left or right id users finger slided left or right. If we fix the container to 100% everything looks nice, however the drag feature is lost because in js the thresholds of 150 are mismatched. Since IOS ignores overflow = hidden we need to use position: fixed as well. Hence card must recognize its dragged on swipe. The best would be if the image can simply swipe out the mobile as it does e.g. with original tinder. No limitations, however, the screens width of course cant overachieve 100% what it will do with 1300px. Any ideas are appreciated...

See the Pen GrZpQJ?page=2 by 10Dimensional (@10Dimensional) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...