aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/SpeedUnits.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 13:47:52 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 13:47:52 +1200
commit3ad3edfadba59e94d95e967e9d5cd28ae671cae4 (patch)
treef7ab337c360bf50a79855787e9fa80e45ebd808c /web/app/store/SpeedUnits.js
parent17ff0791718807be18e9f63aa095ed86d4b82b1c (diff)
downloadtrackermap-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.tar.gz
trackermap-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.tar.bz2
trackermap-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.zip
Re-factor web interface part
Diffstat (limited to 'web/app/store/SpeedUnits.js')
-rw-r--r--web/app/store/SpeedUnits.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js
index 934d03717..15c52625f 100644
--- a/web/app/store/SpeedUnits.js
+++ b/web/app/store/SpeedUnits.js
@@ -25,11 +25,9 @@ Ext.define('Traccar.store.SpeedUnits', {
convert: function(value, unit) {
switch (unit) {
case 'kmh':
- value = value * 1.852;
- return Math.round(value * 10) / 10;
+ return Math.round(value * 1.852 * 10) / 10;
case 'mph':
- value = value * 1.15078;
- return Math.round(value * 10) / 10;
+ return Math.round(value * 1.15078 * 10) / 10;
}
return value;
},