Bwizard Posted January 21, 2021 Share Posted January 21, 2021 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 More sharing options...
ZachSaucier Posted January 21, 2021 Share Posted January 21, 2021 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 More sharing options...
Bwizard Posted January 21, 2021 Author Share Posted January 21, 2021 Apologies for appearing to answer the same question again. I will look at the two callbacks you recommended. Thanks. 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