Only zoom to the clicked issue in the entity sidebar if it isn't visible

This commit is contained in:
Quincy Morgan
2019-02-11 12:10:57 -05:00
parent 6a9bb2d138
commit 0826050b55

View File

@@ -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 {