Jump to content
Search Community

Draggable Rotation Zones

Bwizard test
Moderator Tag

Recommended Posts

I would like to create a zone on a wheel that triggers CSS animations when an element moves through that zone. So I have a wheel of cards (see codepen) and I would like to add a css class that triggers an animation whenever a card moves through the 11 o'clock and 1 o'clock positions both clockwise and anticlockwise. is there a function within draggable that allows me set a zone between 2 points on the 'clock face'? Thanks

See the Pen LYRqYOP by Bwizard (@Bwizard) on CodePen

Link to comment
Share on other sites

Hey Bwizard. I've already answered your question (twice):

If you have a specific question regarding the implementation of what I suggested, please ask that question.

 

4 hours ago, Bwizard said:

is there a function within draggable that allows me set a zone between 2 points on the 'clock face'?

You can use the onDrag and onThrowUpdate callbacks to implement that sort of thing. Though I recommend using GSAP for your animations instead of CSS.

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...