From 6e164ebbf1aa2cb7814759790b3b97753b9e133c Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 23 Mar 2014 00:28:47 +0000 Subject: [PATCH] Specify knob ID --- js/jquery.knob.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index 83d6327..f8ed7eb 100755 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -59,6 +59,7 @@ this.isInit = false; this.fgColor = null; // main color this.pColor = null; // previous color + this.knobId = null; // knob id this.dH = null; // draw hook this.cH = null; // change hook this.eH = null; // cancel hook @@ -105,6 +106,7 @@ displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'), displayPrevious : this.$.data('displayprevious'), fgColor : this.$.data('fgcolor') || '#87CEEB', + knobId : this.$.data('knobid'), inputColor: this.$.data('inputcolor'), font: this.$.data('font') || 'Arial', fontWeight: this.$.data('font-weight') || 'bold', @@ -441,7 +443,7 @@ if (this.o.change) this.cH = this.o.change; if (this.o.cancel) this.eH = this.o.cancel; if (this.o.release) this.rH = this.o.release; - + if (this.o.displayPrevious) { this.pColor = this.h2rgba(this.o.fgColor, "0.4"); this.fgColor = this.h2rgba(this.o.fgColor, "0.6"); @@ -449,6 +451,8 @@ this.fgColor = this.o.fgColor; } + if (this.o.knobId) this.knobId = this.o.knobId; + return this; };