CrazyTim / spin-wheel

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

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

Closed evhan closed 2 months ago

evhan commented 2 months 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 2 months ago

Thanks @evhan!