From 99e1203d46c984c1fcc8f695a3e9a58b6b805b67 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 11 Feb 2019 11:48:21 -0500 Subject: [PATCH] Zoom to entity when opening an issue without a specific location in the entity editor --- modules/ui/entity_issues.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/entity_issues.js b/modules/ui/entity_issues.js index 88df13b84..7c86fc4e3 100644 --- a/modules/ui/entity_issues.js +++ b/modules/ui/entity_issues.js @@ -126,6 +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) { + context.map().zoomToEase(d.entities[0]); } } else { issue.classed('fixes-open', false);