 					width: scope.croppedWidth
 				result.croppedImage = blobArray[0]  if blobArray[0]
 				result.originalImage = blobArray[1]  if blobArray[1]
-				$rootScope.$broadcast "cropme:done", result, "image/#{scope.type}"
+				$rootScope.$broadcast "cropme:done", result, "image/#{scope.type}", scope.id
 
 		scope.$on "cropme:cancel", scope.cancel
 		scope.$on "cropme:ok", scope.ok
 		scope.$watch "src",  -> loadImage scope.src
-		
+
 		loadImage scope.src

	"""
	restrict: "E"
	priority: 99 # it needs to run after the attributes are interpolated
	scope: 
		width: "=?"
		destinationWidth: "="
		height: "=?"

		src: "@?"
		sendOriginal: "@?"
		sendCropped: "@?"
		id: "@?"
	link: (scope, element, attributes) ->
		scope.dropText = "Drop picture here"
		scope.state = "step-1"
