mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
reduce hiding distance for popups
This commit is contained in:
@@ -409,7 +409,7 @@ export class GPXLayer {
|
|||||||
if (waypoint) {
|
if (waypoint) {
|
||||||
let marker = this.markers[waypoint._data.index];
|
let marker = this.markers[waypoint._data.index];
|
||||||
if (marker) {
|
if (marker) {
|
||||||
if (this.map.project(marker.getLngLat()).dist(this.map.project(e.lngLat)) > 100) {
|
if (this.map.project(marker.getLngLat()).dist(this.map.project(e.lngLat)) > 60) {
|
||||||
this.hideWaypointPopup();
|
this.hideWaypointPopup();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -136,7 +136,7 @@ export class OverpassLayer {
|
|||||||
|
|
||||||
maybeHidePopup(e: any) {
|
maybeHidePopup(e: any) {
|
||||||
let poi = get(overpassPopupPOI);
|
let poi = get(overpassPopupPOI);
|
||||||
if (poi && this.map.project([poi.lon, poi.lat]).dist(this.map.project(e.lngLat)) > 100) {
|
if (poi && this.map.project([poi.lon, poi.lat]).dist(this.map.project(e.lngLat)) > 60) {
|
||||||
this.hideWaypointPopup();
|
this.hideWaypointPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user