Jump to content
Search Community

How to GSAP Draggable & Linkable in Android

waimalao test
Moderator Tag

Go to solution Solved by waimalao,

Recommended Posts

Thanks Zach!

I made this change and work fine in mobile devices:
 

//  draggable
$(function() {
  Draggable.create( '#drag', { 
    edgeResistance: 0.5, 
    throwProps: true , 
    type:"x",
    dragClickables:true } );
});

 

Link to comment
Share on other sites

I wouldn't create tweens like that with a fixed amount to scroll. It'll be really frustrating for users to make their mouse land on a link to click. 

 

Here's another way you could do it: 

See the Pen eYBqJqY?editors=0010 by GreenSock (@GreenSock) on CodePen

 

I'm just mapping the width of the screen to the maximum amount of scroll, so when your mouse is all the way to the left of the screen, it shows the left-most content, and when it's all the way on the right, it exposes that content proportionally. 

 

No need for jQuery either :)

 

Happy tweening!

  • Like 2
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...