From 557ffa7f106e44a09a99746dcd8e4f369ea4730d Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 26 Dec 2016 18:06:48 +0500 Subject: Charts implementation --- web/app/view/MapMarkerController.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'web/app/view/MapMarkerController.js') diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js index 510e11b..f8f0e43 100644 --- a/web/app/view/MapMarkerController.js +++ b/web/app/view/MapMarkerController.js @@ -276,26 +276,10 @@ Ext.define('Traccar.view.MapMarkerController', { } }, - getReportColor: function (deviceId) { - var index, reportColor, device = Ext.getStore('Devices').getById(deviceId); - if (device) { - reportColor = device.get('attributes')['web.reportColor']; - } - if (reportColor) { - return reportColor; - } else { - index = 0; - if (deviceId !== undefined) { - index = deviceId % Traccar.Style.mapRouteColor.length; - } - return Traccar.Style.mapRouteColor[index]; - } - }, - getRouteStyle: function (deviceId) { return new ol.style.Style({ stroke: new ol.style.Stroke({ - color: this.getReportColor(deviceId), + color: Traccar.app.getReportColor(deviceId), width: Traccar.Style.mapRouteWidth }) }); @@ -325,7 +309,7 @@ Ext.define('Traccar.view.MapMarkerController', { }, getReportMarker: function (deviceId, angle) { - return this.getMarkerStyle(false, this.getReportColor(deviceId), angle, 'arrow'); + return this.getMarkerStyle(false, Traccar.app.getReportColor(deviceId), angle, 'arrow'); }, resizeMarker: function (style, zoom) { -- cgit v1.2.3