Fix bug with search

invalidateOptionsMenu was called way too often because setLoadingState would fire on every console message
This commit is contained in:
fkloft
2015-02-26 23:56:21 +01:00
parent 7be1575e50
commit 189f57afdd
3 changed files with 38 additions and 22 deletions

View File

@ -1,6 +1,11 @@
// created to start cleaning up "window" interaction
//
window.currentPane = '';
window.show = function(id) {
if(window.currentPane == id) return;
window.currentPane = id;
window.hideall();
runHooks("paneChanged", id);

View File

@ -257,6 +257,7 @@ addHook('search', function(query) {
if(!isNaN(ll[0]) && !isNaN(ll[1])) {
query.addResult({
title: query.term,
description: 'geo coordinates',
position: L.latLng(parseFloat(ll[0]), parseFloat(ll[1])),
});
}