Skip to content
Browse files

Click somewhere on the map hides the overlay

  • Loading branch information...
1 parent a1f6717 commit 1abfac0d24727d9eef88ad7380016b65a79f5387 @sebastiandeutsch committed May 9, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/assets/javascripts/google_maps/google_maps.js.coffee
View
4 app/assets/javascripts/google_maps/google_maps.js.coffee
@@ -9,4 +9,8 @@ window.GoogleMaps = class
mapTypeId: google.maps.MapTypeId.ROADMAP
map = new google.maps.Map(document.getElementById(id), options)
+ google.maps.event.addListener map, 'click', ->
+ if window.activeOverlay != null
+ window.activeOverlay.overlay.toggle()
+ window.activeOverlay = null
return map

0 comments on commit 1abfac0

Please sign in to comment.
Something went wrong with that request. Please try again.