forked from 0x2620/oxjs
fix a bug in map where the input element would not change its style when there are no results
This commit is contained in:
parent
f9143bd62f
commit
3fa654a815
2 changed files with 15 additions and 13 deletions
|
|
@ -647,8 +647,8 @@ Ox.Map = function(options, self) {
|
|||
callback(new Ox.MapPlace(parseGeodata(results[0])));
|
||||
}
|
||||
if (
|
||||
status == google.maps.GeocoderStatus.OK ||
|
||||
status == google.maps.GeocoderStatus.ZERO_RESULTS
|
||||
status == google.maps.GeocoderStatus.OK
|
||||
&& status != google.maps.GeocoderStatus.ZERO_RESULTS
|
||||
) {
|
||||
triggerGeocodeEvent({
|
||||
address: name,
|
||||
|
|
@ -1262,7 +1262,7 @@ Ox.Map = function(options, self) {
|
|||
addPlaceToMap(place);
|
||||
self.map.fitBounds(place.bounds);
|
||||
} else {
|
||||
self.$findInput.addClass('OxError');
|
||||
name && self.$findInput.addClass('OxError');
|
||||
}
|
||||
callback(place);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue