aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/SpeedUnits.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 12:56:51 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 12:56:51 +1200
commita90ce59795690267a0924c2b911f14fe0340a6b4 (patch)
tree5de6442a5a6cc4ed44d7b62cc75f1300a988eb84 /web/app/store/SpeedUnits.js
parentafaede42a0cc8170128219bd1dfa6277e4e1809a (diff)
parent21ed9dbbd8c7be191894b11e895c1c0094b4aac6 (diff)
downloadtraccar-server-a90ce59795690267a0924c2b911f14fe0340a6b4.tar.gz
traccar-server-a90ce59795690267a0924c2b911f14fe0340a6b4.tar.bz2
traccar-server-a90ce59795690267a0924c2b911f14fe0340a6b4.zip
Merge from mungingLabs into odometer
Diffstat (limited to 'web/app/store/SpeedUnits.js')
-rw-r--r--web/app/store/SpeedUnits.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js
index 78686fbb9..934d03717 100644
--- a/web/app/store/SpeedUnits.js
+++ b/web/app/store/SpeedUnits.js
@@ -25,9 +25,11 @@ Ext.define('Traccar.store.SpeedUnits', {
convert: function(value, unit) {
switch (unit) {
case 'kmh':
- return value * 1.852;
+ value = value * 1.852;
+ return Math.round(value * 10) / 10;
case 'mph':
- return value * 1.15078;
+ value = value * 1.15078;
+ return Math.round(value * 10) / 10;
}
return value;
},