mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Never let mouseCoordinates return NaN (fallback to map center)
This commit is contained in:
@@ -511,8 +511,10 @@ export function rendererMap(context) {
|
||||
};
|
||||
|
||||
|
||||
// returns Lng/Lat
|
||||
map.mouseCoordinates = function() {
|
||||
return projection.invert(map.mouse());
|
||||
var coord = map.mouse() || pxCenter();
|
||||
return projection.invert(coord);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user