Releases: CrazyTim/spin-wheel
Releases · CrazyTim/spin-wheel
5.0.2
5.0.1
5.0.0
Breaking
-
Change image properties to accept a HTMLImageElement instead of a url. This has many benefits:
- Less code to ship, test, and maintain.
- Simpler to use from a developer's perspective.
- More obvious that the images should be pre-loaded.
- There are too many use cases to support pre-loading images (for example, we need to provide a callback for when all images have loaded).
- Closes #19.
-
Fix: rename offset properties to
x
andy
instead ofw
andh
-
Fix: set label width correctly when itemLabelAlign == 'center'. Previously it was impossible to increase the label size past a certain point. This will cause "centered" labels to be larger than before.
Other
- Fix: adjust the label's debug bounding box depending on itemLabelAlign
- Fix: set label max width correctly when itemLabelAlign == 'center' (previously it was impossible to increase the label size past a certain point)
- Feat: draw label anchor point when in debug mode
- Improve validation for
Wheel.itemLabelAlign
- Don't draw debug drag points (this is only useful when testing the dragging functionality. Its not really useful for developers to see this, and its annoying in the playground)
- Playground: adjust playground font size on small viewport
- Playground: auto-size the right panel
- Playground: show the hex value of the selected color
- Playground and themes: hide wheel during page load
4.4.0
- Fix broken export button in playground (#37)
- Feat: use
ResizeObserver
to redraw the wheel when the container is resized (#26) - Doc: include
Wheel.resize
in README.md - Doc: add clarity about color values to README.md
- Doc: add detail to README.md about how to draw a pointer
- Doc: include direction parameter in spinToItem method
- Change color of
Debugging.dragEventHue
- Add spin button to themes example page
4.3.2
4.3.1
4.3.0
4.2.0
- Feat: add property
Item.imageOpacity
- Feat: validate params for
Wheel.spinTo
- Fix: clear drag events when the wheel is spun
- Fix: resize item labels when setting items
- Fix: define default value for
Item.value
- Fix: ensure wheel is animated properly on first frame
- Fix: continue to render remaining images when an image fails to load
4.1.1
4.1.0
- Fix: reinstate
Wheel.spin()
method- This method was removed in the last release, however setting
rotationSpeed
directly to spin the wheel was less obvious, and there was no way to raise theonSpin
event. - So instead the
rotationSpeed
method was made readonly.
- This method was removed in the last release, however setting
- Improve validation for
Wheel.rotationSpeedMax
(should be a number >= 0)