aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/DistanceUnits.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/DistanceUnits.js
parent17ff0791718807be18e9f63aa095ed86d4b82b1c (diff)
downloadtraccar-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.tar.gz
traccar-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.tar.bz2
traccar-server-3ad3edfadba59e94d95e967e9d5cd28ae671cae4.zip
Re-factor web interface part
Diffstat (limited to 'web/app/store/DistanceUnits.js')
-rw-r--r--web/app/store/DistanceUnits.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js
index 7f0f93b70..653bf6efb 100644
--- a/web/app/store/DistanceUnits.js
+++ b/web/app/store/DistanceUnits.js
@@ -25,11 +25,9 @@ Ext.define('Traccar.store.DistanceUnits', {
convert: function(value, unit) {
switch (unit) {
case 'km':
- value = value * 0.001;
- return Math.round(value * 100) / 100;
+ return Math.round(value * 0.1) / 100;
case 'mi':
- value = value * 0.000621371;
- return Math.round(value * 100) / 100;
+ return Math.round(value * 0.0621371) / 100;
}
return value;
},
@@ -40,5 +38,5 @@ Ext.define('Traccar.store.DistanceUnits', {
} else {
return '';
}
- },
+ }
});