CrazyTim / spin-wheel

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

The `onRest` doesn't get called when the wheel is stopped by hand (click or tap) #44

Open matronator opened 3 months ago

matronator commented 3 months ago

I looked at the code and it looks like in the events.js the touch/mouse events don't discriminate between a stationary wheel and a spinning one. I think there should be some condition to check if the wheel is spinning and is stopped by the tap/click, to call onRest. I would do a PR, but I'm not sure if I have it correct.

muhammadbasitobaid commented 2 months ago

Yes, there should be something like onStop for stop() or onRest() should be called for stop as well!!!