CrazyTim / spin-wheel

An easy to use, themeable component for randomising choices and prizes.
https://crazytim.github.io/spin-wheel/examples/themes
MIT License
216 stars 59 forks source link

Min drag distance #18

Closed pmoralesp closed 1 year ago

pmoralesp commented 1 year ago

Hi!

This is the best roulette that I have seen in javascript. Congrats for that. I would like to contribute with some functionality that I need.

I added prop minDragDistance to set a minimun drag to fire spin event, otherwise fire a new event called notEnoughDrag (looking for a better name 👀 )

Feel free to merge or gine any feedback, correction, anything.

CrazyTim commented 1 year ago

Hi @pmoralesp, thanks for the PR!

Interesting! I'm trying to understand the use case 🤔. Can you share why you need this, or how you plan to use the new prop?

pmoralesp commented 1 year ago

Hi @pmoralesp, thanks for the PR!

Interesting! I'm trying to understand the use case thinking. Can you share why you need this, or how you plan to use the new prop?

Need this to throw a message in the UI to ask to the user to throw the roulette wheel harder.

But now I think that reading rotationSpeed from spin event moust be enough 🤔