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

Don't allow stopping of a spinning wheel with touch or click #34

Closed meshane closed 7 months ago

meshane commented 7 months ago

I like allowing the user to spin the wheel with a finger on a mobile device, but I don't want them to then stop it by touching the wheel in order to set the result they want.

CrazyTim commented 7 months ago

HI @meshane,

You should be able to do this by handling the onSpin event - simply set isInteractive to false.

matronator commented 5 months ago

@meshane and anyone else reading this in the future. To be clear, I think what @CrazyTim had in mind was to do something like this:

wheel.onSpin(event => {
    wheel.isInteractive = false;
});

wheel.onRest(event => {
    wheel.isInteractive = true;
});