From 185a6e4b3518ea7cebac33430751507b1bb94994 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 10 Nov 2016 12:08:25 +0500 Subject: - Implement category selector for DeviceDialog - Fix jscs and jshint issues --- web/app/view/MapController.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/app/view/MapController.js') diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index a0e28671..103d62ed 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -71,7 +71,7 @@ Ext.define('Traccar.view.MapController', { this.lookupReference('showReportsButton').setVisible(Traccar.app.isMobile()); }, - showReports: function() { + showReports: function () { Traccar.app.showReports(true); }, @@ -290,7 +290,7 @@ Ext.define('Traccar.view.MapController', { color: Traccar.Style.mapTextStrokeColor, width: Traccar.Style.mapTextStrokeWidth }), - offsetY: - image.getSize()[1] / 2 - Traccar.Style.mapTextOffset, + offsetY: -image.getSize()[1] / 2 - Traccar.Style.mapTextOffset, font : Traccar.Style.mapTextFont }) }); @@ -305,7 +305,7 @@ Ext.define('Traccar.view.MapController', { if (deviceId !== undefined) { index = deviceId % Traccar.Style.mapRouteColor.length; } - return this.getMarkerStyle(false, Traccar.Style.mapRouteColor[index], angle, 'route'); + return this.getMarkerStyle(false, Traccar.Style.mapRouteColor[index], angle, 'arrow'); }, resizeMarker: function (style, zoom) { @@ -315,13 +315,13 @@ Ext.define('Traccar.view.MapController', { style.getImage().angle, style.getImage().category); text = style.getText(); - text.setOffsetY(- image.getSize()[1] / 2 - Traccar.Style.mapTextOffset); - return newStyle = new ol.style.Style({ + text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset); + return new ol.style.Style({ image: image, text: text }); }, - + rotateMarker: function (style, angle) { var newStyle = new ol.style.Style({ image: Traccar.DeviceImages.getImageIcon(style.getImage().fill, -- cgit v1.2.3