mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Merge pull request #7948 from openstreetmap/revert-7816-trim-search-features-whitespace
Revert "added function to strip whitespace from searches"
This commit is contained in:
@@ -87,7 +87,7 @@ export function uiFeatureList(context) {
|
||||
|
||||
|
||||
function keypress() {
|
||||
var q = stripWhitespace(search.property('value')),
|
||||
var q = search.property('value'),
|
||||
items = list.selectAll('.feature-list-item');
|
||||
if (d3_event.keyCode === 13 && q.length && items.size()) { // return
|
||||
click(items.datum());
|
||||
@@ -106,9 +106,6 @@ export function uiFeatureList(context) {
|
||||
drawList();
|
||||
}
|
||||
|
||||
function stripWhitespace(val) {
|
||||
return val.replace(/ /g, '');
|
||||
}
|
||||
|
||||
function mapDrawn(e) {
|
||||
if (e.full) {
|
||||
@@ -121,7 +118,7 @@ export function uiFeatureList(context) {
|
||||
var result = [];
|
||||
var graph = context.graph();
|
||||
var visibleCenter = context.map().extent().center();
|
||||
var q = stripWhitespace(search.property('value')).toLowerCase();
|
||||
var q = search.property('value').toLowerCase();
|
||||
|
||||
if (!q) return result;
|
||||
|
||||
@@ -239,7 +236,7 @@ export function uiFeatureList(context) {
|
||||
|
||||
|
||||
function drawList() {
|
||||
var value = stripWhitespace(search.property('value'));
|
||||
var value = search.property('value');
|
||||
var results = features();
|
||||
|
||||
list.classed('filtered', value.length);
|
||||
@@ -358,7 +355,7 @@ export function uiFeatureList(context) {
|
||||
|
||||
|
||||
function geocoderSearch() {
|
||||
services.geocoder.search(stripWhitespace(search.property('value')), function (err, resp) {
|
||||
services.geocoder.search(search.property('value'), function (err, resp) {
|
||||
_geocodeResults = resp || [];
|
||||
drawList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user