effectussoftware / react-custom-roulette

Repository for the react-custom-roulette library
MIT License
312 stars 112 forks source link

Is there a way of changing pointer result? #126

Open lorenzoa7 opened 1 year ago

lorenzoa7 commented 1 year ago

By default, the pointer is located at the top right position of the wheel. I wonder if there's any way of changing it directly to the top of the wheel. Not only its position, but also taking the top prize number when the wheel stops spinning.

theweboratory commented 1 year ago

You could rotate the div that the roulette is in to change the location of the pointer.

e.g CSS

.roulette_container { transform: rotate(-20deg); }

I've used 20deg for this example but it might be a different amount.

wlisesrivas commented 1 year ago

The CSS rotation works as @theweboratory has suggested, but I think this should be a property for the component.