Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format definition is not easy to use #341

Open
alexpalex9 opened this issue Oct 4, 2016 · 0 comments
Open

format definition is not easy to use #341

alexpalex9 opened this issue Oct 4, 2016 · 0 comments

Comments

@alexpalex9
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant