aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/MapMarkerController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 11:22:48 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 11:22:48 +1200
commit3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e (patch)
tree74f6b995121b615fe39f3d7a23864c37a8db89a8 /web/app/view/map/MapMarkerController.js
parent1e10dfb3c9f93998c6060297b8458f2a3c3df485 (diff)
downloadtrackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.tar.gz
trackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.tar.bz2
trackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.zip
Fix various style issues
Diffstat (limited to 'web/app/view/map/MapMarkerController.js')
-rw-r--r--web/app/view/map/MapMarkerController.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js
index 24742ff9..d3b813b2 100644
--- a/web/app/view/map/MapMarkerController.js
+++ b/web/app/view/map/MapMarkerController.js
@@ -211,7 +211,7 @@ Ext.define('Traccar.view.map.MapMarkerController', {
projection = mapView.getProjection();
center = ol.proj.fromLonLat([position.get('longitude'), position.get('latitude')]);
pointResolution = ol.proj.getPointResolution(projection, mapView.getResolution(), center);
- radius = (position.get('accuracy') / ol.proj.METERS_PER_UNIT.m) * mapView.getResolution() / pointResolution;
+ radius = position.get('accuracy') / ol.proj.METERS_PER_UNIT.m * mapView.getResolution() / pointResolution;
if (feature) {
feature.getGeometry().setCenter(center);
@@ -252,8 +252,8 @@ Ext.define('Traccar.view.map.MapMarkerController', {
marker.set('record', device);
style = this.getLatestMarker(this.getDeviceColor(device),
- position.get('course'),
- device.get('category'));
+ position.get('course'),
+ device.get('category'));
style.getText().setText(device.get('name'));
marker.setStyle(style);
marker.setId(device.get('id'));
@@ -405,7 +405,7 @@ Ext.define('Traccar.view.map.MapMarkerController', {
width: Traccar.Style.mapTextStrokeWidth
}),
offsetY: -image.getSize()[1] / 2 - Traccar.Style.mapTextOffset,
- font : Traccar.Style.mapTextFont
+ font: Traccar.Style.mapTextFont
})
});
},
@@ -420,10 +420,8 @@ Ext.define('Traccar.view.map.MapMarkerController', {
resizeMarker: function (style, zoom) {
var image, text;
- image = Traccar.DeviceImages.getImageIcon(style.getImage().fill,
- zoom,
- style.getImage().angle,
- style.getImage().category);
+ image = Traccar.DeviceImages.getImageIcon(
+ style.getImage().fill, zoom, style.getImage().angle, style.getImage().category);
text = style.getText();
text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
style.setText(text);
@@ -431,18 +429,14 @@ Ext.define('Traccar.view.map.MapMarkerController', {
},
rotateMarker: function (style, angle) {
- style.setImage(Traccar.DeviceImages.getImageIcon(style.getImage().fill,
- style.getImage().zoom,
- angle,
- style.getImage().category));
+ style.setImage(Traccar.DeviceImages.getImageIcon(
+ style.getImage().fill, style.getImage().zoom, angle, style.getImage().category));
},
updateDeviceMarker: function (style, color, category) {
var image, text;
- image = Traccar.DeviceImages.getImageIcon(color,
- style.getImage().zoom,
- style.getImage().angle,
- category);
+ image = Traccar.DeviceImages.getImageIcon(
+ color, style.getImage().zoom, style.getImage().angle, category);
text = style.getText();
text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
style.setText(text);
@@ -599,7 +593,7 @@ Ext.define('Traccar.view.map.MapMarkerController', {
}
},
- filterDevices: function (store) {
+ filterDevices: function () {
Ext.getStore('Devices').each(this.updateDeviceVisibility, this, false);
}
});