Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/vsr/mxn into vsr-master
Browse files Browse the repository at this point in the history
  • Loading branch information
dezfowler committed Nov 16, 2011
2 parents e68208b + aad6812 commit 21fab51
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions source/mxn.googlev3.core.js
Expand Up @@ -508,20 +508,28 @@ Marker: {
},

openBubble: function() {
var infowindow = new google.maps.InfoWindow({
content: this.infoBubble
});
google.maps.event.addListener(infowindow, 'closeclick', function(closedWindow) {
// TODO: set proprietary_infowindow to null, fire closeInfoBubble
});
var infowindow,
marker = this;
if (!this.hasOwnProperty('proprietary_infowindow') || this.proprietary_infowindow === null) {
infowindow = new google.maps.InfoWindow({
content: this.infoBubble
});
google.maps.event.addListener(infowindow, 'closeclick', function(closedWindow) {
marker.closeBubble();
});
}
else{
infowindow = this.proprietary_infowindow;
}
this.openInfoBubble.fire({'marker': this});
infowindow.open(this.map,this.proprietary_marker);
this.proprietary_infowindow = infowindow; // Save so we can close it later
},

closeBubble: function() {
if (this.hasOwnProperty('proprietary_infowindow')) {
if (this.hasOwnProperty('proprietary_infowindow') && this.proprietary_infowindow !== null) {
this.proprietary_infowindow.close();
this.proprietary_infowindow = null;
this.closeInfoBubble.fire({'marker': this});
}
},
Expand Down

0 comments on commit 21fab51

Please sign in to comment.