Skip to content

Releases: CrazyTim/spin-wheel

3.1.0

05 Feb 12:10
Compare
Choose a tag to compare
  • Perf: only redraw the wheel when a property has changed
  • Fix: item labels are drawn above wheel border

3.0.0

31 Jan 12:23
Compare
Choose a tag to compare
  • 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

15 Jan 03:29
Compare
Choose a tag to compare
  • 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

10 Jan 11:10
Compare
Choose a tag to compare
  • Feat: draw images on items
  • Feat: add borderColor and borderWidth properties
  • Fix: line width doesn't scale with canvas size

2.0.2

08 Jan 10:58
Compare
Choose a tag to compare
  • Feat: draw a debug line for the pointer
  • Fix: adjust radius to account for lineWidth
  • Fix: initialise onCurrentIndexChange

2.0.1

31 Dec 06:28
Compare
Choose a tag to compare
  • 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

28 Dec 04:36
Compare
Choose a tag to compare
  • 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)

1.0.0

04 Dec 04:52
Compare
Choose a tag to compare

Initial release.