From 8e3bce1a91c8f673de488d352844618980c58637 Mon Sep 17 00:00:00 2001
From: dasdesign
Date: Thu, 6 Nov 2014 11:02:53 +0200
Subject: [PATCH 1/2] Update jquery.knob.js
Add handler pointer for knob when used as scroll slider!
1.Lines replaced:
line-123
lines 789-803
2.How to use handler:
$(".knob").({
handle: true
});
set handler true or false (show or hide) default is false!
---
js/jquery.knob.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/js/jquery.knob.js b/js/jquery.knob.js
index 5294ffa..3031e2c 100644
--- a/js/jquery.knob.js
+++ b/js/jquery.knob.js
@@ -120,6 +120,7 @@
inline: false,
step: this.$.data('step') || 1,
rotation: this.$.data('rotation'),
+ handle : false,//handle show or hide (true or false) defaulr false
// Hooks
draw: null, // function () {}
@@ -784,6 +785,22 @@
c.strokeStyle = r ? this.o.fgColor : this.fgColor ;
c.arc(this.xy, this.xy, this.radius, a.s, a.e, a.d);
c.stroke();
+
+ /*Set handle knob*/
+ if(this.o.handle){
+
+ var indicatorX =(this.xy)+Math.cos(eat + 0.00001)*this.radius;
+ var indicatorY =(this.xy)+Math.sin(eat + 0.00001)*this.radius;
+
+ c.beginPath();
+ c.arc(indicatorX, indicatorY, this.lineWidth/2, 0, this.PI2, false);
+ c.fillStyle = this.o.fgColor;
+ c.fill();
+ c.lineWidth = 2;
+ c.strokeStyle = this.o.bgColor;
+ c.stroke();
+ }
+ /*Set handle knob*/
};
this.cancel = function () {
From 5b0437f7caf2a0da24fbc823d90b30bc9e21f9f5 Mon Sep 17 00:00:00 2001
From: dasdesign
Date: Thu, 6 Nov 2014 11:09:31 +0200
Subject: [PATCH 2/2] Update README.md
---
README.md | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/README.md b/README.md
index d20c58a..a755014 100755
--- a/README.md
+++ b/README.md
@@ -60,6 +60,7 @@ UI :
* font : font family.
* fontWeight : font weight.
* bgColor : background color.
+* handle : use knob handler.
Hooks
-------
@@ -138,6 +139,18 @@ Set the value
.trigger('change');
```
+Set the handler
+-------
+
+```html
+
+```
Supported browser
-------