deselect place in list when selecting a result on map

This commit is contained in:
rolux 2011-05-29 18:22:54 +02:00
parent 940968a3e4
commit 09641b11e4

View file

@ -298,6 +298,7 @@ Ox.ListMap = function(options, self) {
},
*/
changeplace: function(event, data) {
// fixme: is there a changeplace event in Map???
self.$placeForm.values(Ox.map(data, function(val, key) {
// fixme: no size key anymore
return key == 'size' ? Ox.formatArea(val) : val;
@ -605,8 +606,8 @@ Ox.ListMap = function(options, self) {
isResult = place.id[0] == '_';
//isResult && self.options.places.push(place);
self.selectedPlace = place.id;
place.id[0] != '_' && self.$list.options({
selected: place.id ? [place.id] : []
self.$list.options({
selected: place.id && !isResult ? [place.id] : []
});
self.$placeTitleFlag.attr({
src: Ox.getImageByGeoname('icon', 16, place.geoname)