A dial component for Ember using http://anthonyterrien.com/knob/
npm install --save ember-cli-knob
ember g ember-cli-knob
In the template you can use this helper
The component can also take options
The ember-knob
helper has options to customize it.
Minimum value of the dial. Default: 0.
Maximum value of the dial. Default: 100.
Step value. Default: 1.
Starting angle in degrees. Default: 0.
Starting angle in degrees. Default: 360.
Stop at min & max on keydown/mousewheel. Default: true.
Disable input and events. Default: false.
Direction of progression. Default: clockwise.
Display mode "cursor", cursor size could be changed passing a numeric value to the option. Default: gauge.
Gauge thickness. Default: false.
Gauge stroke endings. Default: butt. Rounded: round.
Dial width.
Dial height.
Hide or display input. Default: true. Hide input: false.
Displays the previous value with transparency. Default: false.
Foreground color.
Input value (number) color.
Font family.
Font weight.
Background color.
In the template you can add change method to listen then knob changes
controllers/application.js
import Ember from "ember";
export default Ember.ObjectController.extend({
actions: {
changeKnob: function() {
console.log("changeKnob");
}
}
});
Please help us! We are always looking to improve this plugin. You can help us by submitting issues and pull requests.