Browse Source

#1395, adds setting for limiting values above/below bounds

pull/1407/head
jlukic 10 years ago
parent
commit
1c3f4f0a09
1 changed files with 9 additions and 0 deletions
  1. 9
      src/definitions/modules/progress.js

9
src/definitions/modules/progress.js

@ -295,6 +295,14 @@ $.fn.progress = function(parameters) {
if(module.total) {
module.value = Math.round( (percent / 100) * module.total);
}
if(settings.limitValues) {
module.value = (module.value > 100)
? 100
: (module.value < 0)
? 0
: module.value
;
}
module.set.barWidth(percent);
module.set.barLabel();
if(percent === 100) {
@ -607,6 +615,7 @@ $.fn.progress.settings = {
autoSuccess : true,
showActivity : true,
limitValues : true,
label : 'percent',
precision : 1,

Loading…
Cancel
Save