From ead9ee816cf62053f4cbdd6a3027de0851e18a8f Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 22 Aug 2022 12:21:04 +0300 Subject: [PATCH] UI: Fixed show tooltip in map edit button --- .../home/components/widget/lib/maps/leaflet-map.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 3ef89b5031..121a6aabce 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 @@ -334,6 +334,7 @@ export default abstract class LeafletMap { drawRectangle: false, drawPolyline: false, drawPolygon: false, + drawText: false, dragMode: !this.options.hideEditControlButton, editMode: (this.editPolygons || this.editCircle) && !this.options.hideEditControlButton, cutPolygon: false, @@ -493,12 +494,12 @@ export default abstract class LeafletMap { .find('a[role="button"]:not(.leaflet-pm-action)') .each((index, element) => { let title; - if (element.children.length) { - title = (element.children[0] as HTMLElement).title; - $(element).children().removeAttr('title'); - } else { + if (element.title) { title = element.title; $(element).removeAttr('title'); + } else if (element.parentElement.title) { + title = element.parentElement.title; + $(element).parent().removeAttr('title'); } const tooltip = $(element).tooltipster( {