mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 15:08:23 +02:00
Zoom to ways and relations upon clicking on their issues in the issues pane
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user