mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Only zoom to the clicked issue in the entity sidebar if it isn't visible
This commit is contained in:
@@ -126,7 +126,8 @@ export function uiEntityIssues(context) {
|
||||
var loc = d.loc();
|
||||
if (loc) {
|
||||
context.map().centerZoomEase(loc, Math.max(context.map().zoom(), 18));
|
||||
} else if (d.entities && d.entities.length > 0) {
|
||||
} else if (d.entities && d.entities.length > 0 &&
|
||||
!d.entities[0].intersects(context.map().extent(), context.graph())) {
|
||||
context.map().zoomToEase(d.entities[0]);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user