diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-08 12:03:27 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-08 12:03:27 +1200 |
commit | 62a584aea59666bd95d0a88e917f24fe5999df16 (patch) | |
tree | dde786f36bd2d94fd6178646acc97a0f92e0244d /web/app/store/DistanceUnits.js | |
parent | ff266d342ae3c6922005f043470ef659447882b5 (diff) | |
download | traccar-server-62a584aea59666bd95d0a88e917f24fe5999df16.tar.gz traccar-server-62a584aea59666bd95d0a88e917f24fe5999df16.tar.bz2 traccar-server-62a584aea59666bd95d0a88e917f24fe5999df16.zip |
Add knots option for speed value
Diffstat (limited to 'web/app/store/DistanceUnits.js')
-rw-r--r-- | web/app/store/DistanceUnits.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js index 29c4f28e0..2805d52f0 100644 --- a/web/app/store/DistanceUnits.js +++ b/web/app/store/DistanceUnits.js @@ -30,11 +30,10 @@ Ext.define('Traccar.store.DistanceUnits', { formatValue: function (value, unit) { var model; - if (unit) { - model = this.findRecord('key', unit); - return (value * model.get('factor')).toFixed(2) + ' ' + model.get('name'); - } else { - return value; + if (!unit) { + unit = 'km'; } + model = this.findRecord('key', unit); + return (value * model.get('factor')).toFixed(2) + ' ' + model.get('name'); } }); |