use ui.Toggle for geocoder results

This commit is contained in:
Ansis Brammanis
2013-03-08 13:01:16 -05:00
parent f72e294156
commit 2ef167ec0d

View File

@@ -46,7 +46,7 @@ iD.ui.Geocoder = function(context) {
if (d3.event.keyCode == 13) clickResult(d);
});
spans.exit().remove();
resultsList.classed('hide', false);
resultsList.call(iD.ui.Toggle(true));
} else {
applyBounds(resultExtent(resp[0].boundingbox));
}
@@ -75,7 +75,7 @@ iD.ui.Geocoder = function(context) {
if (show !== shown) {
button.classed('active', show);
gcForm.call(iD.ui.Toggle(show));
if (!show) resultsList.classed('hide', !show);
if (!show) resultsList.call(iD.ui.Toggle(show));
if (show) inputNode.node().focus();
else inputNode.node().blur();
shown = show;