mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Use eased zoom when selecting features from search results and zoom to their full extent
This commit is contained in:
@@ -342,14 +342,8 @@ export function uiFeatureList(context) {
|
||||
} else if (d.entity) {
|
||||
utilHighlightEntities([d.id], false, context);
|
||||
|
||||
if (d.entity.type === 'node') {
|
||||
context.map().center(d.entity.loc);
|
||||
} else if (d.entity.type === 'way') {
|
||||
var center = context.projection(context.map().center());
|
||||
var edge = geoChooseEdge(context.graph().childNodes(d.entity), center, context.projection);
|
||||
context.map().center(edge.loc);
|
||||
}
|
||||
context.enter(modeSelect(context, [d.entity.id]));
|
||||
context.map().zoomToEase(d.entity);
|
||||
|
||||
} else {
|
||||
// download, zoom to, and select the entity with the given ID
|
||||
|
||||
Reference in New Issue
Block a user