try fix dragging on touch devices

This commit is contained in:
vcoppe
2025-11-19 23:36:02 +01:00
parent 3542a7c24d
commit cad77e2b10

View File

@@ -598,7 +598,10 @@ export class GPXLayer {
} }
waypointLayerOnMouseMove(e: mapboxgl.MapMouseEvent | mapboxgl.MapTouchEvent) { waypointLayerOnMouseMove(e: mapboxgl.MapMouseEvent | mapboxgl.MapTouchEvent) {
if (!this.draggedWaypointIndex || e.point.equals(this.draggingStartingPosition)) { if (
!this.draggedWaypointIndex ||
(e.type === 'mousemove' && e.point.equals(this.draggingStartingPosition))
) {
return; return;
} }