j&o Posted November 12, 2019 Share Posted November 12, 2019 Hi there, Can't seem to be able to get "scroll" / or "scrollLeft" types to work with Draggable in v3 (other options seem to work just fine). Any ideas about what might be wrong with my pen? See the Pen yLLxOZa by organdonor47 (@organdonor47) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted November 12, 2019 Share Posted November 12, 2019 Hey ueno and welcome to the GreenSock forums. Thanks for being a Business Green member! As the GSAP 3 release notes say, support for scrollLeft and scrollTop on Draggable have been removed because they can be reproduced without it. We try to keep the code as small as we (reasonably) can! Try just using type: 'x' in your project. Let us know (and potentially create another minimal demo) if you run into issues! 1 Link to comment Share on other sites More sharing options...
j&o Posted November 12, 2019 Author Share Posted November 12, 2019 Thank you Zach, should've read the release notes more carefully ?. I'll have a go with type: x Link to comment Share on other sites More sharing options...
ZachSaucier Posted November 12, 2019 Share Posted November 12, 2019 1 minute ago, ueno said: should've read the release notes more carefully ? Not a problem, the notes are quite long Link to comment Share on other sites More sharing options...
jim47 Posted November 13, 2019 Share Posted November 13, 2019 hi @ZachSaucier, I am not sure how I can get draggable to update the scroll position anymore. My issue is that I want the user to be able to scroll with a scrollbar, I also update scroll position on a mousewheel event, and would want to be able to update that scroll position via Draggable as well. If i usetype x, then I can transform horizontally well enough, but only with a css transform rather than being able to update scroll position. Scroll position is subsequently broken if the user opted to scroll or use a mousewheel event. Is there any way to do this with Draggable and inertia, or should I just look at getting this to work natively (or stick to gsap 2, but I'd much rather update!) Link to comment Share on other sites More sharing options...
ZachSaucier Posted December 2, 2019 Share Posted December 2, 2019 Hey @jim47 and welcome to the GreenSock forums. Sorry for the delay in getting back to you, that doesn't usually happen but we've been busy with GSAP 3 stuff and this turned out to be a little more tricky than we expected. We created a function that you can include to include the scroll draggable behavior in GSAP 3 which you can view here: See the Pen XWJrYvp by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
GreenSock Posted December 5, 2019 Share Posted December 5, 2019 As of version 3.0.2 (just released), Draggable has type: "scroll" | "scrollTop" | "scrollLeft", so this should be much easier for you now. ? 3 Link to comment Share on other sites More sharing options...
jim47 Posted December 6, 2019 Share Posted December 6, 2019 hey @ZachSaucier @Jack thanks so much for looking in to this, really appreciated. will update gsap version right now (or maybe after a tea and a shower). great stuff! 1 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