kailin
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by kailin
-
-
Hi!
Original slider code that I've based this off of:
See the Pen veyxyQ?editors=0010 by osublake (@osublake) on CodePen
The original code (above) is everything I need for a slider, but I wanted to use v3 of GSAP (no particular reason, just want to).
I've tried changing the above to use v3 without all my personal modifications, but once I change
to usevar transform =
proxy._gsTransform
var transform = gsap.getProperty(proxy)
andtransform.x
totransform("x")
, the same issue as below happens. The slide colors have to be changed as well since this method of randomizing colors doesn't work with v3.The bug in my code (see codepen below)
- Dragging and button press (next) gets stuck on the original start point.
- Going left works well.
- Going left, then right works well. But it gets stuck once you hit the original start point.
- Going right / next will cause you to be stuck for a while, as the progress and x values are still increasing. At that point, the animation will be stuck until you press / drag previous enough times to reach the start point again.
Thank you for any assistance
See the Pen MWYqxXR?editors=0011 by jen_ (@jen_) on CodePen
Infinite, draggable slider (with controls) using GSAP v3
in GSAP
Posted
Ohhh my god thank you so much. Progress requiring a positive value is such an obvious answer!