summaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-08-18 00:30:17 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-17 22:58:39 -0500
commit4ac018712f19a4972601917e0cae3a4d9651961c (patch)
tree1ba57561acc5f2655ef1f7d29e1b9fde81e4ce34 /theme/list_lib.js
parent362671352e93c26705d54eb4968e6e90178b4598 (diff)
downloadsubsurface-4ac018712f19a4972601917e0cae3a4d9651961c.tar.gz
HTML: Fix Fake precision value.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 5d8538b1f..fc82dc81b 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -843,12 +843,12 @@ function get_cylinder_HTML(cylinder)
var cEPressure = cylinder.EPressure;
if (cSPressure === "--") {
- cSPressure = mbar_to_bar(items[dive_id].samples[0][2]) + " bar";
+ cSPressure = Math.round(mbar_to_bar(items[dive_id].samples[0][2])).toFixed(1) + " bar";
}
if (cEPressure === "--") {
var nonZeroCEPressure = lastNonZero();
- cEPressure = mbar_to_bar(nonZeroCEPressure) + " bar";
+ cEPressure = Math.round(mbar_to_bar(nonZeroCEPressure)).toFixed(1) + " bar";
}
return '<tr><td class="Cyl">' + cylinder.Type + '</td><td class="Cyl">' + cylinder.Size + '</td><td class="Cyl">' + cylinder.WPressure + '</td>' + '<td class="Cyl">' + cSPressure + '</td><td class="Cyl">' + cEPressure + '</td><td class="Cyl">' + cylinder.O2 + '</td></tr>';
@@ -1009,7 +1009,7 @@ function mm_to_meter(mm)
function gram_to_km(gram)
{
- return gram / 1000;
+ return (gram / 1000).toFixed(1);
}
function ml_to_litre(ml)