Browse Source

Merge pull request #7127 from vvlladd28/bug/leaflet-edit/tooltipster

[3.4.2] UI: Fixed show tooltip in map edit button
pull/7199/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
2df8d6f34a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

9
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(
{

Loading…
Cancel
Save