Permalink
Browse files

added option 'angleAperture' || default = 360

'angleAperture' define maximum angle of knob (in degree)
  • Loading branch information...
1 parent 91baa07 commit babc6fce6b6d9489c9507aedfc907caa8b625178 @FabrizioC committed Jun 26, 2012
Showing with 3 additions and 2 deletions.
  1. BIN .DS_Store
  2. +3 −2 js/jquery.knob.js
View
BIN .DS_Store
Binary file not shown.
View
@@ -49,7 +49,7 @@ $(function () {
};
this.angle = function (nv) {
- return (nv - opt.min) * PI2 / (opt.max - opt.min);
+ return (nv - opt.min) * opt.angleAperture / (opt.max - opt.min);
};
this.draw = function (nv) {
@@ -242,7 +242,8 @@ $(function () {
,'tickWidth' : $this.data('tickWidth') || 0.02
,'tickColorizeValues' : $this.data('tickColorizeValues') || true
,'skin' : $this.data('skin') || 'default'
- ,'angleOffset': degreeToRadians($this.data('angleoffset'))
+ ,'angleOffset': degreeToRadians($this.data('angleoffset'))
+ ,'angleAperture': degreeToRadians($this.data('angleaperture')) || 2 * Math.PI
// Hooks
,'draw' :

0 comments on commit babc6fc

Please sign in to comment.