%PDF- %PDF-
Direktori : /home/opti/workflow/src/public/app-assets/js/scripts/extensions/ |
Current File : /home/opti/workflow/src/public/app-assets/js/scripts/extensions/knob.min.js |
/*! * stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack) * Copyright 2018 PIXINVENT * Licensed under the Themeforest Standard Licenses */ $(document).ready(function(){function clock(){var $s=$(".second"),$m=$(".minute"),$h=$(".hour"),d=new Date,s=d.getSeconds(),m=d.getMinutes(),h=d.getHours();$s.val(s).trigger("change"),$m.val(m).trigger("change"),$h.val(h).trigger("change"),t=setTimeout(function(){clock()},1e3)}var rtl=!1;"rtl"==$("html").data("textdirection")&&(rtl=!0),$(".knob").knob({rtl:rtl,change:function(value){},release:function(value){},cancel:function(){},draw:function(){if("tron"==this.$.data("skin")){this.cursorExt=.3;var pa,a=this.arc(this.cv),r=1;return this.g.lineWidth=this.lineWidth,this.o.displayPrevious&&(pa=this.arc(this.v),this.g.beginPath(),this.g.strokeStyle=this.pColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,pa.s,pa.e,pa.d),this.g.stroke()),this.g.beginPath(),this.g.strokeStyle=r?this.o.fgColor:this.fgColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,a.s,a.e,a.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}}}),clock();var v,up=0,down=0,i=0,$idir=$(".idir"),$ival=$(".ival"),incr=function(){i++,$idir.show().html("+").fadeOut(),$ival.html(i)},decr=function(){i--,$idir.show().html("-").fadeOut(),$ival.html(i)};$(".infinite").knob({min:0,max:20,stopper:!1,change:function(){v>this.cv?up?(decr(),up=0):(up=1,down=0):v<this.cv&&(down?(incr(),down=0):(down=1,up=0)),v=this.cv}})});