oskr Posted October 10, 2020 Share Posted October 10, 2020 Hello, How can I implement this draggable effect from Apple's Maps app 1 Link to comment Share on other sites More sharing options...
ZachSaucier Posted October 12, 2020 Share Posted October 12, 2020 Hey oskr and welcome to the GreenSock forums. By "this draggable effect" do you mean the drawer component coming up from the bottom? You can create that simply by creating a Draggable with type: "y" and imposing the bounds that you need. Link to comment Share on other sites More sharing options...
oskr Posted October 12, 2020 Author Share Posted October 12, 2020 9 hours ago, ZachSaucier said: Hey oskr and welcome to the GreenSock forums. By "this draggable effect" do you mean the drawer component coming up from the bottom? You can create that simply by creating a Draggable with type: "y" and imposing the bounds that you need. Thanks for your response, I want to create the draggable modal A small part of the modal showing, when the user drag that modal above a threshold it pops up (like the image above). I'm stuck at this: See the Pen oNLjjNN by omar2205 (@omar2205) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted October 12, 2020 Share Posted October 12, 2020 Thanks for the demo. How about something like this? See the Pen bGeVVPm?editors=0010 by GreenSock (@GreenSock) on CodePen 2 Link to comment Share on other sites More sharing options...
oskr Posted October 13, 2020 Author Share Posted October 13, 2020 It's super glitchy Link to comment Share on other sites More sharing options...
ZachSaucier Posted October 13, 2020 Share Posted October 13, 2020 It's just a pen to get you started You probably want to use the onDrag event instead. Also likely want to add snapping so that it can't end up in a partial state. 1 Link to comment Share on other sites More sharing options...
oskr Posted October 13, 2020 Author Share Posted October 13, 2020 1 minute ago, ZachSaucier said: It's just a pen to get you started You probably want to use the onDrag event instead. Also likely want to add snapping so that it can't end up in a partial state. Thanks for the help. Link to comment Share on other sites More sharing options...
oskr Posted October 13, 2020 Author Share Posted October 13, 2020 Okay, I kinda made it work but I'm stuck when I open it it moves very slowly tried to play with duration but no luck See the Pen oNLjjNN by omar2205 (@omar2205) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted October 13, 2020 Share Posted October 13, 2020 I think you just want a lower dragResistance? Try a value like 0.5. Is that what you mean? 1 Link to comment Share on other sites More sharing options...
oskr Posted October 13, 2020 Author Share Posted October 13, 2020 40 minutes ago, ZachSaucier said: I think you just want a lower dragResistance? Try a value like 0.5. Is that what you mean? idk I played with the numbers a bit it kinda worked See the Pen oNLjjNN by omar2205 (@omar2205) on CodePen Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now