{"_id":"jquery-knob","_rev":"6-87d6239cfc0308e97c4ed28592a4e9ac","name":"jquery-knob","description":"Nice, downward compatible, touchable, jQuery dial","dist-tags":{"latest":"1.2.11"},"versions":{"1.2.11":{"name":"jquery-knob","version":"1.2.11","description":"Nice, downward compatible, touchable, jQuery dial","main":"dist/jquery.knob.min.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/aterrien/jQuery-Knob.git"},"keywords":["jquery","knob","dial"],"author":{"name":"Anthony Terrien"},"license":"MIT","bugs":{"url":"https://github.com/aterrien/jQuery-Knob/issues"},"homepage":"https://github.com/aterrien/jQuery-Knob#readme","gitHead":"fb9b10a4118e80798c8a5922b4eb1b42c72f461c","_id":"jquery-knob@1.2.11","_shasum":"f37c39dbc1c7a6a6c12cdb2ed4f6bffb683f10d6","_from":".","_npmVersion":"2.12.0","_nodeVersion":"0.12.5","_npmUser":{"name":"felixmc","email":"felixmilea@gmail.com"},"dist":{"shasum":"f37c39dbc1c7a6a6c12cdb2ed4f6bffb683f10d6","tarball":"https://registry.npmjs.org/jquery-knob/-/jquery-knob-1.2.11.tgz","integrity":"sha512-gyeWDmtr2x8XJLSNS2JGNYDUNmfmMrwmFcGPDJ074jnPPvMYf3PJFud4/6AubCT8ahOY7UL4YvALtSwCrxtBBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOSVjkQGufr4hJmiuColVRJGaOduPwJ3Ec3B6vOW+KFAiAPP2GyKHjrKbhbiclXY8SGt8WOZtlHmQfo3NlX01R+YA=="}]},"maintainers":[{"name":"felixmc","email":"felixmilea@gmail.com"}]}},"readme":"jQuery Knob\n=============\n\n- canvas based ; no png or jpg sprites.\n- touch, mouse and mousewheel, keyboard events implemented.\n- downward compatible ; overloads an input element.\n\nExample\n-------\n\n```html\n<input type=\"text\" value=\"75\" class=\"dial\">\n\n<script>\n    $(function() {\n        $(\".dial\").knob();\n    });\n</script>\n```\n\nOptions\n-------\n\nOptions are provided as attributes 'data-option':\n\n```html\n<input type=\"text\" class=\"dial\" data-min=\"-50\" data-max=\"50\">\n```\n\n... or in the \"knob()\" call :\n\n```javascript\n$(\".dial\").knob({\n    'min':-50,\n    'max':50\n});\n```\n\nThe following options are supported :\n\nBehaviors :\n* min : min value | default=0.\n* max : max value | default=100.\n* step : step size | default=1.\n* angleOffset : starting angle in degrees | default=0.\n* angleArc : arc size in degrees | default=360.\n* stopper : stop at min & max on keydown/mousewheel | default=true.\n* readOnly : disable input and events | default=false.\n* rotation : direction of progression | default=clockwise.\n\nUI :\n* cursor : display mode \"cursor\", cursor size could be changed passing a numeric value to the option, default width is used when passing boolean value \"true\" | default=gauge.\n* thickness : gauge thickness.\n* lineCap : gauge stroke endings. | default=butt, round=rounded line endings\n* width : dial width.\n* displayInput : default=true | false=hide input.\n* displayPrevious : default=false | true=displays the previous value with transparency.\n* fgColor : foreground color.\n* inputColor : input value (number) color.\n* font : font family.\n* fontWeight : font weight.\n* bgColor : background color.\n\nHooks\n-------\n\n```html\n<script>\n    $(\".dial\").knob({\n        'release' : function (v) { /*make something*/ }\n    });\n</script>\n```\n\n* 'release' : executed on release\n\n    Parameters :\n    + value : int, current value\n\n* 'change' : executed at each change of the value\n\n    Parameters :\n    + value : int, current value\n\n* 'draw' : when drawing the canvas\n\n    Context :\n    - this.g : canvas context 2D (see Canvas documentation)\n    - this.$ : jQuery wrapped element\n    - this.o : options\n    - this.i : input\n    - ... console.log(this);\n\n* 'cancel' : triggered on [esc] keydown\n\n* 'format' : allows to format output (add unit %, ms ...)\n\nThe scope (this) of each hook function is the current Knob instance (refer to the demo code).\n\nExample\n-------\n\n```html\n<input type=\"text\" value=\"75\" class=\"dial\">\n\n<script>\n    $(\".dial\").knob({\n        'change' : function (v) { console.log(v); }\n    });\n</script>\n```\n\nDynamically configure\n-------\n\n```html\n<script>\n    $('.dial').trigger(\n        'configure',\n        {\n            \"min\":10,\n            \"max\":40,\n            \"fgColor\":\"#FF0000\",\n            \"skin\":\"tron\",\n            \"cursor\":true\n        }\n    );\n</script>\n```\n\nSet the value\n-------\n\n```html\n<script>\n    $('.dial')\n        .val(27)\n        .trigger('change');\n</script>\n```\n\nSupported browser\n-------\n\nTested on Chrome, Safari, Firefox, IE>=8.0 (IE8.0 with excanvas).\n\n![secretplan](https://raw.github.com/aterrien/jQuery-Knob/master/secretplan.jpg)\n","maintainers":[{"name":"felixmc","email":"felixmilea@gmail.com"}],"time":{"modified":"2022-06-19T05:06:04.358Z","created":"2015-07-14T16:53:36.831Z","1.2.11":"2015-07-14T16:53:36.831Z"},"homepage":"https://github.com/aterrien/jQuery-Knob#readme","keywords":["jquery","knob","dial"],"repository":{"type":"git","url":"git+https://github.com/aterrien/jQuery-Knob.git"},"author":{"name":"Anthony Terrien"},"bugs":{"url":"https://github.com/aterrien/jQuery-Knob/issues"},"license":"MIT","readmeFilename":"README.md","users":{"petecemi":true,"ngtk":true,"ux_web":true}}