diff --git a/ClientApp/src/app/features/flights-map/components/flights-map-body/flights-map-body.component.ts b/ClientApp/src/app/features/flights-map/components/flights-map-body/flights-map-body.component.ts index d128624c..08ade991 100644 --- a/ClientApp/src/app/features/flights-map/components/flights-map-body/flights-map-body.component.ts +++ b/ClientApp/src/app/features/flights-map/components/flights-map-body/flights-map-body.component.ts @@ -150,13 +150,20 @@ export class FlightsMapBodyComponent implements OnInit, AfterViewInit { { icon: markerBlueSmall, title: city.code, + autoPanOnFocus: false, } ) .on('click', ()=> this.handleMarkerClick(city.code)) .bindTooltip(city.name, { permanent : true, direction : 'top', - className : 'city-label' + className : 'city-label', + interactive: true, + }); + + marker.getTooltip()?.on('click', (event: L.LeafletMouseEvent) => { + L.DomEvent.stop(event); + this.handleMarkerClick(city.code); }); const countryType: CountryType = city.country_code === 'RU' ? 'ru' : 'other'; diff --git a/ClientApp/src/styles/_leaflet-popup.scss b/ClientApp/src/styles/_leaflet-popup.scss index 2b22e5bf..d4e486ba 100644 --- a/ClientApp/src/styles/_leaflet-popup.scss +++ b/ClientApp/src/styles/_leaflet-popup.scss @@ -17,7 +17,8 @@ 0 1px #ffffff88, 0 -1px #ffffff88; - pointer-events: none; + pointer-events: auto; + cursor: pointer; } /* убираем треугольный «хвостик» */