potatoDie Posted September 21, 2020 Share Posted September 21, 2020 I'm a bit puzzled by the Draggable update function https://greensock.com/docs/v3/Plugins/Draggable/update(). It doesn't seem to do anything, even in Blake's demo See the Pen JBwxjr by osublake (@osublake) on CodePen Commenting out this.update() still works. In my added Codepen I change the position of a draggable in 3 different ways, and either update is not needed, or it doesn't help. See the Pen ZEWmKQq by potatoDie (@potatoDie) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted May 15, 2021 Share Posted May 15, 2021 I'm so sorry about the super tardy response, @potatoDie ! I'm not sure how this slipped through the cracks. The reason you're seeing that issue is because you're not setting the transforms via GSAP (we ALWAYS recommend funneling all your transform-related stuff through GSAP because it's faster and more accurate, as explained here). You have three options in terms of solutions: Set it via GSAP (by far the best) gsap.set(b2, {x: 0, y: 250, z: 0, scale: 1, rotation: 0}); Clear the transforms via GSAP before you manually set it (to trigger GSAP to clear its cached values): gsap.set(b2, {clearProps: "transform"}); Tell GSAP to re-parse the transforms (and use something like x: "+=0" just to trigger some kind of transform that must be parsed): gsap.set(b2, {parseTransform: true, x:"+=0"}); Let us know if you need anything else. 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