mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 23:13:42 +00:00
Limit search results to top 50
This commit is contained in:
@@ -61,13 +61,14 @@ iD.presets.Collection = function(collection) {
|
||||
|
||||
var other = presets.item(geometry);
|
||||
|
||||
return iD.presets.Collection(
|
||||
_.unique(
|
||||
leading_name.concat(
|
||||
leading_terms,
|
||||
levenstein_name,
|
||||
leventstein_terms,
|
||||
other)));
|
||||
var results = leading_name.concat(
|
||||
leading_terms,
|
||||
levenstein_name,
|
||||
leventstein_terms).slice(0, 50);
|
||||
|
||||
return iD.presets.Collection(_.unique(
|
||||
results.concat(other)
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user