Jump to content
Search Community

dragging to set x y and radius

trufo test
Moderator Tag

Recommended Posts

Hello,

I'm trying to make some functions to resize a circle and move it around using the mouse.

It works (check the codepen I made), but...

Only if the playhead is moving or at least in a playfull state XD.

When paused I cannot influence my circle.

Isn't there a kind of refresh command I could use in my functions to still make GSAP read the new style at the time of pause?

See the Pen abWOZEo by trufo (@trufo) on CodePen

Link to comment
Share on other sites

Just checking if you've seen draggable
 



If you'd rather stick with the core of GSAP, I reckon you'll need to create some sort of loop with gsap.ticker() to constantly update the coordinates when the element's being dragged.

Obviously as we have a plugin that does this it would be a little out of the scope of these forums to craft custom interaction for you! But anyone else is welcome to jump in.

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...