Skip to content

Commit

Permalink
Bring back default zoom on form reset
Browse files Browse the repository at this point in the history
  • Loading branch information
mpowaga committed Jun 10, 2015
1 parent 33325cb commit 7e1df95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client/autoform-map.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AutoForm.addInputType 'map',
template: 'afMap'
valueOut: ->
node = $(@context)

lat = node.find('.js-lat').val()
lng = node.find('.js-lng').val()

Expand Down Expand Up @@ -98,7 +98,7 @@ initTemplateAndGoogleMaps = ->
@$('.js-map').closest('form').on 'reset', =>
@data.marker and @data.marker.setMap null
@data.map.setCenter new google.maps.LatLng @data.options.defaultLat, @data.options.defaultLng
@data.map.setZoom 0
@data.map.setZoom @data.options?.zoom or 0

Template.afMap.rendered = ->
@autorun =>
Expand Down

0 comments on commit 7e1df95

Please sign in to comment.