Zoom to ways and relations upon clicking on their issues in the issues pane

This commit is contained in:
Quincy Morgan
2019-02-04 10:27:35 -05:00
parent a0558102d6
commit 2677a88df4
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -204,11 +204,11 @@ export function validationIssue(attrs) {
if (this.coordinates && Array.isArray(this.coordinates) && this.coordinates.length === 2) {
return this.coordinates;
}
if (this.entities && this.entities.length > 0) {
/*if (this.entities && this.entities.length > 0) {
if (this.entities[0].loc) {
return this.entities[0].loc;
}
}
}*/
};
if (this.fixes) {
+2
View File
@@ -140,6 +140,8 @@ export function uiIssues(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().zoomTo(d.entities[0]);
}
if (d.entities) {
context.enter(modeSelect(