jQuery-Knob icon indicating copy to clipboard operation
jQuery-Knob copied to clipboard

format definition is not easy to use

Open alexpalex9 opened this issue 9 years ago • 0 comments

I would like to have in hmtl code the format and the unit to be set (like angleOffset, fgColor, step...): <input data-unit='min'... data-format="x/60'> but it is not handled nby knob. I made some little modification of the orignal code so I can retrieve those information in my javascript knob definition : let say v is in seconds and I want to display minutes format : function(v){ var unit=this.unit; var format=this.format; var newv=eval(formulaDisplay.replace("x",v)); return newv+unit; }

What do you think of this improvement? We could also add data1, data2, data3 to allow free additionnal data if needed.

alexpalex9 avatar Oct 04 '16 11:10 alexpalex9