aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/state/StateController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/state/StateController.js')
-rw-r--r--web/app/view/state/StateController.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 36978c3d0..bc125e529 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -95,7 +95,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'speed') {
var speedUnits = Ext.getStore('SpeedUnits');
unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || '';
- value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit);
+ value = speedUnits.formatValue(value, unit);
} else if (value instanceof Date) {
value = Ext.Date.format(value, styles.dateTimeFormat);
}
@@ -121,7 +121,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'distance' || key === 'odometer') {
var distanceUnits = Ext.getStore('DistanceUnits');
unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || '';
- value = distanceUnits.convert(value, unit) + ' ' + distanceUnits.getUnitName(unit);
+ value = distanceUnits.formatValue(value, unit);
}
store.add(Ext.create('Traccar.model.Attribute', {