From 4900e49de91166c39066d349a4d95f1b4eb7c174 Mon Sep 17 00:00:00 2001 From: jaketrent Date: Wed, 23 Jan 2013 13:43:56 -0700 Subject: [PATCH 1/5] add ability to independently set input (middle text) color --- js/jquery.knob.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index d3a6026..3c3956e 100644 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -97,6 +97,7 @@ displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'), displayPrevious : this.$.data('displayprevious'), fgColor : this.$.data('fgcolor') || '#87CEEB', + inputColor: this.$.data('inputcolor') || this.$.data('fgcolor') || '#87CEEB', inline : false, // Hooks @@ -574,7 +575,7 @@ ,'background' : 'none' ,'font' : 'bold ' + ((this.o.width / s) >> 0) + 'px Arial' ,'text-align' : 'center' - ,'color' : this.o.fgColor + ,'color' : this.o.inputColor || this.o.fgColor ,'padding' : '0px' ,'-webkit-appearance': 'none' }) From df7f358c85ea4509b17e966090f0bd6e0fac2092 Mon Sep 17 00:00:00 2001 From: jaketrent Date: Wed, 23 Jan 2013 13:45:43 -0700 Subject: [PATCH 2/5] add inputColor option doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c8a4c3f..8203d66 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ UI : * displayInput : default=true | false=hide input. * displayPrevious : default=false | true=displays the previous value with transparency. * fgColor : foreground color. +* inputColor : input value (number) color. * bgColor : background color. Hooks From 6effba1627f5736906ac60be56e647384aab31ab Mon Sep 17 00:00:00 2001 From: jaketrent Date: Wed, 23 Jan 2013 13:55:05 -0700 Subject: [PATCH 3/5] add ability to set line cap style (eg, to rounded) --- js/jquery.knob.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index 3c3956e..5a83de5 100644 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -92,6 +92,7 @@ || this.$.data('cursor') || 0, thickness : this.$.data('thickness') || 0.35, + lineCap : this.$.data('linecap') || 'butt', width : this.$.data('width') || 200, height : this.$.data('height') || 200, displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'), @@ -541,6 +542,7 @@ this.cursorExt = this.o.cursor / 100; this.xy = this.w2; this.lineWidth = this.xy * this.o.thickness; + this.lineCap = this.o.lineCap; this.radius = this.xy - this.lineWidth / 2; this.o.angleOffset @@ -605,6 +607,8 @@ c.lineWidth = this.lineWidth; + c.lineCap = this.lineCap; + this.o.cursor && (sat = eat - this.cursorExt) && (eat = eat + this.cursorExt); From 8e441ff2094798ab529c70a84e31e434eaa14197 Mon Sep 17 00:00:00 2001 From: jaketrent Date: Wed, 23 Jan 2013 13:55:40 -0700 Subject: [PATCH 4/5] add line cap doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8203d66..ab0a7ad 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Behaviors : UI : * cursor : display mode "cursor" | default=gauge. * thickness : gauge thickness. +* lineCap : gauge stroke endings. * width : dial width. * displayInput : default=true | false=hide input. * displayPrevious : default=false | true=displays the previous value with transparency. From 4a120eeb0532e87507857c0ed7d0315a71f68231 Mon Sep 17 00:00:00 2001 From: jaketrent Date: Wed, 23 Jan 2013 13:58:21 -0700 Subject: [PATCH 5/5] add line cap option to doc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab0a7ad..06b01da 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Behaviors : UI : * cursor : display mode "cursor" | default=gauge. * thickness : gauge thickness. -* lineCap : gauge stroke endings. +* lineCap : gauge stroke endings. | default=butt, round=rounded line endings * width : dial width. * displayInput : default=true | false=hide input. * displayPrevious : default=false | true=displays the previous value with transparency.