File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ function load_hash(no_refresh) {
121121 break ;
122122 case "qm" :
123123 def . mode = v . replace ( / _ / g, ' ' ) ;
124+ if ( modeList . indexOf ( def . mode ) == - 1 ) def . mode = ( is_mobile ) ? modeDefaultMobile : modeDefault ;
124125 break ;
125126 case "q" :
126127 def . query = v ;
@@ -1011,11 +1012,14 @@ $(window).ready(function() {
10111012
10121013 if ( text === wvar . query ) return ;
10131014
1015+ // when running an empty search, it's probably best to reset the query mode
1016+
10141017 wvar . query = text ;
10151018 stopFollow ( ) ;
10161019 zoomed_in = false ;
10171020 wvar . zoom = true ;
10181021
1022+ if ( text === "" ) { wvar . mode = null ; }
10191023 clean_refresh ( wvar . mode , true ) ;
10201024 } ) ;
10211025} ) ;
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ google.maps.DropDownControl.prototype.setVisible = function(isVisible) {
175175 this . div_ . style . display = ( isVisible ) ? 'block' : 'none' ;
176176} ;
177177
178+ google . maps . DropDownControl . prototype . select = function ( text ) {
179+ this . header . innerHTML = ( this . options . headerPrefix || "" ) + text ;
180+ } ;
181+
178182// simple status control
179183
180184google . maps . StatusTextControl = function ( options ) {
Original file line number Diff line number Diff line change @@ -331,7 +331,12 @@ function clean_refresh(text, force) {
331331 if ( ajax_inprogress ) return false ;
332332
333333 stopAjax ( ) ;
334+
335+ // reset mode if, invalid mode is specified
336+ if ( modeList . indexOf ( text ) == - 1 ) text = ( is_mobile ) ? modeDefaultMobile : modeDefault ;
337+
334338 wvar . mode = text ;
339+ tmpC . select ( text ) ;
335340
336341 position_id = 0 ;
337342
You can’t perform that action at this time.
0 commit comments