Tagliavia Posted September 30, 2021 Share Posted September 30, 2021 Hi folks I have a box that i want the user to drag and go back to start position on release, something like if attached by a rubber. How can i get around it with draggable? Link to comment Share on other sites More sharing options...
Solution PointC Posted September 30, 2021 Solution Share Posted September 30, 2021 Hi @Tagliavia This should work for you. Draggable.create("#yourTargetBox", { onDragEnd: () => { gsap.to(this.target, { x: 0, y: 0 }); } }); Happy tweening. 3 Link to comment Share on other sites More sharing options...
Tagliavia Posted September 30, 2021 Author Share Posted September 30, 2021 Thank you sir!! 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