diff options
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/AttributeFormatter.js | 4 | ||||
-rw-r--r-- | web/app/Style.js | 5 | ||||
-rw-r--r-- | web/app/view/ServerDialog.js | 6 | ||||
-rw-r--r-- | web/app/view/UserDialog.js | 6 |
4 files changed, 14 insertions, 7 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index 44cc7d5a8..1cbc1cfc0 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -18,7 +18,7 @@ Ext.define('Traccar.AttributeFormatter', { singleton: true, coordinateFormatter: function (value) { - return value.toFixed(6); + return value.toFixed(Traccar.Style.coordinatePrecision); }, speedFormatter: function (value) { @@ -36,7 +36,7 @@ Ext.define('Traccar.AttributeFormatter', { defaultFormatter: function (value) { if (typeof value === 'number') { - return Number(value.toFixed(2)); + return Number(value.toFixed(Traccar.Style.numberPrecision)); } else if (typeof value === 'boolean') { return value ? Ext.Msg.buttonText.yes : Ext.Msg.buttonText.no; } else if (value instanceof Date) { diff --git a/web/app/Style.js b/web/app/Style.js index 5202a3fb2..f4868aec3 100644 --- a/web/app/Style.js +++ b/web/app/Style.js @@ -57,5 +57,8 @@ Ext.define('Traccar.Style', { mapRadiusSelected: 14, mapMaxZoom: 19, - mapDelay: 500 + mapDelay: 500, + + coordinatePrecision: 6, + numberPrecision: 2 }); diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js index 8f81bb9b9..da197ffe4 100644 --- a/web/app/view/ServerDialog.js +++ b/web/app/view/ServerDialog.js @@ -63,11 +63,13 @@ Ext.define('Traccar.view.ServerDialog', { }, { xtype: 'numberfield', name: 'latitude', - fieldLabel: Strings.positionLatitude + fieldLabel: Strings.positionLatitude, + decimalPrecision: Traccar.Style.coordinatePrecision }, { xtype: 'numberfield', name: 'longitude', - fieldLabel: Strings.positionLongitude + fieldLabel: Strings.positionLongitude, + decimalPrecision: Traccar.Style.coordinatePrecision }, { xtype: 'numberfield', name: 'zoom', diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js index 32acd950c..783ddd159 100644 --- a/web/app/view/UserDialog.js +++ b/web/app/view/UserDialog.js @@ -73,11 +73,13 @@ Ext.define('Traccar.view.UserDialog', { }, { xtype: 'numberfield', name: 'latitude', - fieldLabel: Strings.positionLatitude + fieldLabel: Strings.positionLatitude, + decimalPrecision: Traccar.Style.coordinatePrecision }, { xtype: 'numberfield', name: 'longitude', - fieldLabel: Strings.positionLongitude + fieldLabel: Strings.positionLongitude, + decimalPrecision: Traccar.Style.coordinatePrecision }, { xtype: 'numberfield', name: 'zoom', |