From 8462e6a11a96c29bb4034a62df31fc0174e455d8 Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Thu, 23 Apr 2015 23:07:59 -0700 Subject: [PATCH] Corrected order of operations to enable precision (rounding). --- src/definitions/modules/progress.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/definitions/modules/progress.js b/src/definitions/modules/progress.js index 6b99733dc..135fb81af 100644 --- a/src/definitions/modules/progress.js +++ b/src/definitions/modules/progress.js @@ -236,7 +236,7 @@ $.fn.progress = function(parameters) { if(settings.precision === 0) { return Math.round(displayPercent); } - return Math.round(displayPercent * (10 * settings.precision) / (10 * settings.precision) ); + return Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision); }, percent: function() { @@ -361,11 +361,11 @@ $.fn.progress = function(parameters) { percent = Math.round(percent); } else { - percent = Math.round(percent * (10 * settings.precision) / (10 * settings.precision) ); + percent = Math.round(percent * (10 * settings.precision)) / (10 * settings.precision); } module.percent = percent; if(module.total) { - module.value = Math.round( (percent / 100) * module.total); + module.value = Math.round( (percent / 100) * module.total * (10 * settings.precision)) / (10 * settings.precision); } else if(settings.limitValues) { module.value = (module.value > 100)