 
     @addGeosearch()
     @setupMapEvents()
+    @enableDraggableForMarker()
 
 
   addGeosearch: ->

      lng: @$scope.editState.geolocation.lng
      uuid: livingmapsUid.guid()
      icon: @uiModel.getDefaultIcon()
    @$scope.markers.push(newMarker)

    @disableAddMarkerState()

    @$scope.editState.markerSelected = false


  enableDraggableForMarker: ->
    for marker in @$scope.markers
      marker.draggable = true


  disableDraggableForMarkers: ->
    for marker in @$scope.markers
      marker.draggable = false


  close: (event) ->
    @snippet.data
      center:
        lat: @$scope.center.lat
        lng: @$scope.center.lng
        zoom: @$scope.center.zoom
    @disableDraggableForMarkers()
    @$modalInstance.dismiss('close')
    event.stopPropagation() # so sidebar selection is not lost
