mirror of
				https://github.com/gpxstudio/gpx.studio.git
				synced 2025-11-04 05:21:09 +00:00 
			
		
		
		
	reduce hiding distance for popups
This commit is contained in:
		@@ -409,7 +409,7 @@ export class GPXLayer {
 | 
			
		||||
        if (waypoint) {
 | 
			
		||||
            let marker = this.markers[waypoint._data.index];
 | 
			
		||||
            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();
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ export class OverpassLayer {
 | 
			
		||||
 | 
			
		||||
    maybeHidePopup(e: any) {
 | 
			
		||||
        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();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user