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

Add animated wheel overlay images #31

Closed Amitnale007 closed 5 months ago

Amitnale007 commented 5 months ago

Wanna add animated wheel overlay images..... I tried to add other overlay svg file but it is not rendering what's the issue?

CrazyTim commented 5 months ago

Hi @Amitnale007,

This library uses the Canvas API, and the spec says only the first frame of SVG images should be drawn. It would be nice to be able to do this, but I don't think its supported by the tech.

As a workaround, and because you simply want to overlay an animated svg image, try adding the svg element to the DOM and then position it over the top of the wheel container using css (for example: position: absolute).