Comments (1)
Hi! I updated your jsfiddle https://jsfiddle.net/bf8aLtwj/18/ with this approach:
-
separate the main format function from optons:
var format = function(v) { var sec = parseInt(v)*60; var min = Math.floor(sec / 60); sec -= min * 60; return min + ':' + (sec < 10 ? "0" + sec : sec); };
-
then I call at draw event instead of format hook:
`
$('#knob1').knob({
'min': 0,
'max': 60,
'width': '100%',
'step': 1,
'thickness': 0.3,
'fgColor': '#06BABC',
'bgColor': '#333',
'draw': function(){
this.i.val(format(this.cv));
}
});
`
from jquery-knob.
Related Issues (20)
- nditions
- JQuery-Knob - Angular 5 HOT 4
- when value="0" and lineCap: 'round' , on firefox browser bug HOT 1
- Issue with step
- Big Numbers HOT 5
- How do I get the old value of knob?
- Remove space between two dial selection
- Problem with digit leaving the Dial on small screen HOT 2
- not a issue but easy way to get in contact with
- Jquery-knob in foreignObject
- Force JQuery-knob to not exceed max amount
- Add custom label in center of knob
- Compatibility problem with Select2
- Num key pad, (.) is not working.
- When a PHP variable is passed in the value, it doesn't print the value, only 0
- how to reset gfx on knob? HOT 1
- Trigger return NaN
- Design issue.
- This always sets inline to true regardless of inline:false in initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-knob.