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

Preserve `imageOpacity` when assigning to `Wheel.items` #49

Closed evhan closed 3 weeks ago

evhan commented 1 month ago

The imageOpacity property wasn't previously passed through when initializing Item objects, so it would be ignored.

One can work around this by setting imageOpacity manually, as in the following example, but it seems like this property is simply missing from the setter and should be included with the rest of the fields.

var wheel = new Wheel(container, { items })

for (const i in items) {
  wheel.items[i].imageOpacity = items[i].imageOpacity
}
CrazyTim commented 3 weeks ago

Thanks @evhan!