1.0.4 • Published 7 years ago
ct-slider-x v1.0.4
How to use it
create 'Wheel' object
let wheel = new Wheel();
constructor accepts object with such parameters:
colorSchema
- (array of 12 colors) default['#e67e25', '#e74b3c', '#e71e64', '#94a4a4', '#10a085', '#2780b8', '#884a9d', '#913f6d', '#5fc5ce', '#364c63', '#6cce5f', '#efc31a']
radius
- default200
countSectors
- default12
fontSize
- default12
timeInterval
- default0.002
speed
- default0.9
options
- default empty object{}
canvas
- (DOM object) defaultdocument.getElementById("myCanvas")
Methods
wheel.firstDraw()
- just draws wheelwheel.run()
- Starts the wheel rotationwheel.setResSector(sectorNumber)
- adjustment of the final positionwheel.changeOptions(ObjectOptions)
- repaints wheel options when broadcaster changes it