1.0.4 • Published 8 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- default200countSectors- default12fontSize- default12timeInterval- default0.002speed- default0.9options- 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