effectussoftware / react-custom-roulette

Repository for the react-custom-roulette library
MIT License
322 stars 114 forks source link

Modify option's radius size #30

Closed dhatGuy closed 1 year ago

dhatGuy commented 3 years ago

Is there a way to change the size of radius of an option, Let's say, the roulette wheel has two options. I want the first option radius to take 70% and the second 30%>

luchozamora1 commented 1 year ago

@dhatGuy If you want to change the option's radius, there's nothing at the moment to do so, and it's not in our plans to work on this feature.

Anyway, there is an option to change the option's size. For that, you can use the optionSize field from the WheelData interface.

As stated in the documentation:

optionSize:

Integer that sets the size of the option measured in roulette pieces. 
For example: if data provides 2 options A and B, and you set A's optionSize to 2, 
B's optionSize to 1, the roulette will render 3 pieces: 2 corresponding to A and 
1 corresponding to B. Therefore, A will appear to be twice as big as B.