mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-06 19:31:41 +00:00
500ms debounce on typeahead taginfo calls
This commit is contained in:
@@ -214,7 +214,7 @@ iD.ui.inspector = function() {
|
||||
value = row.selectAll('.value');
|
||||
|
||||
key.call(d3.typeahead()
|
||||
.data(function(_, callback) {
|
||||
.data(_.debounce(function(_, callback) {
|
||||
taginfo.keys({
|
||||
geometry: geometry,
|
||||
query: key.property('value')
|
||||
@@ -223,10 +223,10 @@ iD.ui.inspector = function() {
|
||||
return {value: d.key};
|
||||
}));
|
||||
});
|
||||
}));
|
||||
}, 500)));
|
||||
|
||||
value.call(d3.typeahead()
|
||||
.data(function(_, callback) {
|
||||
.data(_.debounce(function(_, callback) {
|
||||
taginfo.values({
|
||||
key: key.property('value'),
|
||||
geometry: geometry,
|
||||
@@ -236,7 +236,7 @@ iD.ui.inspector = function() {
|
||||
return {value: d.value, title: d.description};
|
||||
}));
|
||||
});
|
||||
}));
|
||||
}, 500)));
|
||||
}
|
||||
|
||||
function focusNewKey() {
|
||||
|
||||
Reference in New Issue
Block a user