         widget.element.trigger "mapchange"
 
       this.map.on "draw:deleted", (e) ->
+        layers = e.layers
+        layers.eachLayer (layer) =>
+          widget.element.trigger 'mapeditor:feature_delete', layer.feature
+
         widget._saveUpdates()
         widget.element.trigger "mapchange"
 

        featureId = $(e.currentTarget).closest('.leaflet-popup-content').find('*[data-internal-id]').data('internal-id')
        newName = $(e.currentTarget).closest('.popup-content').find('input[type="text"]').val()

        this.updateFeatureProperties(featureId, 'name', newName)

        layer = this.findLayer(featureId)

        false

      widget.element.trigger "mapeditor:loaded"

    updateFeature: (feature_id, attributeName, attributeValue) ->
      this.updateFeatureProperties(feature_id, attributeName, attributeValue)
      layer = this.findLayer(feature_id)

      #update popup
      this.popupize layer.feature, layer


    updateFeatureProperties: (feature_id, attributeName, attributeValue) ->
      layer = this.findLayer(feature_id)
