diff options
author | Abyss777 <abyss@fox5.ru> | 2016-12-26 18:06:48 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-12-26 18:06:48 +0500 |
commit | 557ffa7f106e44a09a99746dcd8e4f369ea4730d (patch) | |
tree | bd58f402c90d0f930d6cb13867c8be4738ebdd69 /web/app/store/DistanceUnits.js | |
parent | 082f7926b846f876613f27f21779b594e79ea0c7 (diff) | |
download | trackermap-web-557ffa7f106e44a09a99746dcd8e4f369ea4730d.tar.gz trackermap-web-557ffa7f106e44a09a99746dcd8e4f369ea4730d.tar.bz2 trackermap-web-557ffa7f106e44a09a99746dcd8e4f369ea4730d.zip |
Charts implementation
Diffstat (limited to 'web/app/store/DistanceUnits.js')
-rw-r--r-- | web/app/store/DistanceUnits.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js index cc9f1e92..57d15fc8 100644 --- a/web/app/store/DistanceUnits.js +++ b/web/app/store/DistanceUnits.js @@ -33,6 +33,15 @@ Ext.define('Traccar.store.DistanceUnits', { factor: 0.000539957 }], + convertValue: function (value, unit) { + var model; + if (!unit) { + unit = 'km'; + } + model = this.findRecord('key', unit); + return value * model.get('factor'); + }, + formatValue: function (value, unit) { var model; if (!unit) { |