From 4ac018712f19a4972601917e0cae3a4d9651961c Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Mon, 18 Aug 2014 00:30:17 +0300 Subject: [PATCH] HTML: Fix Fake precision value. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- theme/list_lib.js | 6 +++--- 1 file 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 '' + cylinder.Type + '' + cylinder.Size + '' + cylinder.WPressure + '' + '' + cSPressure + '' + cEPressure + '' + cylinder.O2 + ''; @@ -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)