From 1ff382413dc1bf831d265d7b5daa981a96980bd5 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 22 Sep 2022 11:09:00 +0300 Subject: [PATCH] UI: Refactoring for coments --- .../home/components/widget/lib/maps/leaflet-map.ts | 1 - .../modules/home/components/widget/lib/maps/markers.ts | 9 +++------ .../help/en_US/widget/lib/map/clustering_color_fn.md | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts index 7afbb8216f..56e247e3dd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts @@ -923,7 +923,6 @@ export default abstract class LeafletMap { if (settings.showTooltip) { marker.updateMarkerTooltip(data); } - marker.updateMarkerData(data); marker.updateMarkerIcon(settings); return marker; } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts index d1c3b46ce0..007f82b869 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts @@ -90,8 +90,9 @@ export class Marker { } setDataSources(data: FormattedData, dataSources: FormattedData[]) { - this.data = data; - this.dataSources = dataSources; + this.data = data; + this.dataSources = dataSources; + this.leafletMarker.options.tbMarkerData = data; } updateMarkerTooltip(data: FormattedData) { @@ -107,10 +108,6 @@ export class Marker { } } - updateMarkerData(data: FormattedData) { - this.leafletMarker.options.tbMarkerData = data; - } - updateMarkerPosition(position: L.LatLng) { if (!this.leafletMarker.getLatLng().equals(position) && !this.editing) { this.location = position; diff --git a/ui-ngx/src/assets/help/en_US/widget/lib/map/clustering_color_fn.md b/ui-ngx/src/assets/help/en_US/widget/lib/map/clustering_color_fn.md index 8ca4fd9af8..d34ca44a88 100644 --- a/ui-ngx/src/assets/help/en_US/widget/lib/map/clustering_color_fn.md +++ b/ui-ngx/src/assets/help/en_US/widget/lib/map/clustering_color_fn.md @@ -10,7 +10,7 @@ A JavaScript function used to compute clustering marker color. **Parameters:**