Releases: CrazyTim/spin-wheel
Releases · CrazyTim/spin-wheel
3.1.0
- Perf: only redraw the wheel when a property has changed
- Fix: item labels are drawn above wheel border
3.0.0
- Feat: clip item images and labels
- Rename
Item.imageSize
-> imageScale
- Rename
Wheel.pointerRotation
-> pointerAngle
- Remove
rotationDirection
from onSpin
event (unnecessary, can be determined from rotationSpeed
)
- Fix: item images overlap the wheel border
2.2.0
- Feat: add method
Wheel.remove()
to unregister event handlers
- Set
currentIndex
to -1 when there are no items
- Validate params in
Wheel
constructor
- Fix:
onCurrentIndexChange
is raised when wheel is initialised
- Fix: sometimes
onCurrentIndexChange
is infinitely raised
2.1.0
- Feat: draw images on items
- Feat: add
borderColor
and borderWidth
properties
- Fix: line width doesn't scale with canvas size
2.0.2
- Feat: draw a debug line for the pointer
- Fix: adjust radius to account for
lineWidth
- Fix: initialise onCurrentIndexChange
2.0.1
- Feat: pass the random adjustment value as an optional param to
spin()
- Fix: only raise
onSpin
event when rotationSpeed
!= 0
- Fix: incorrect initialisation for
pointerRotation
2.0.0
- Rename
onSpin.direction
-> rotationDirection
- Add
onSpin.dragEvents
- Improve documentation and test coverage
- Improve drag algorithm
- Fix: incorrect drag direction when dragging more than 180 degrees
- Fix: incorrect calculation for label angle
- Fix: draw drag events in the correct order (in debug mode)