1 line
1.0 KiB
JavaScript
1 line
1.0 KiB
JavaScript
!function(e){"use strict";e(document).ready(function(){e(".knob").knob({draw:function(){if("tron"===this.$.data("skin")){this.cursorExt=.3;var e,t=this.arc(this.cv),i=1;return this.g.lineWidth=this.lineWidth,this.o.displayPrevious&&(e=this.arc(this.v),this.g.beginPath(),this.g.strokeStyle=this.pColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,e.s,e.e,e.d),this.g.stroke()),this.g.beginPath(),this.g.strokeStyle=i?this.o.fgColor:this.fgColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,t.s,t.e,t.d),this.g.stroke(),this.g.lineWidth=2,this.g.beginPath(),this.g.strokeStyle=this.o.fgColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth+1+2*this.lineWidth/3,0,2*Math.PI,!1),this.g.stroke(),!1}}});var t,i=0,r=0,a=0,o=e("div.idir"),n=e("div.ival"),l=function(){a++,o.show().html("+").fadeOut(),n.html(a)},s=function(){a--,o.show().html("-").fadeOut(),n.html(a)};return e("input.infinite").knob({min:0,max:20,stopper:!1,change:function(){t>this.cv?i?(s(),i=0):(i=1,r=0):t<this.cv&&(r?(l(),r=0):(r=1,i=0)),t=this.cv}}),!1})}(jQuery); |