💄 Use fixed pixel for mobile marker offset view

This commit is contained in:
itskovacs 2025-11-04 21:13:16 +01:00
parent 69cde40fc1
commit 14ad34ca9a

View File

@ -259,7 +259,11 @@ export class DashboardComponent implements OnInit, AfterViewInit {
this.selectedPlace = { ...place };
let toView = { ...e.latlng };
if ('ontouchstart' in window) toView.lat = toView.lat - 0.0175;
if ('ontouchstart' in window) {
const pixelPoint = this.map!.latLngToContainerPoint(e.latlng);
pixelPoint.y += 75;
toView = this.map!.containerPointToLatLng(pixelPoint);
}
marker.closeTooltip();
this.map?.setView(toView);