@@ -119,7 +119,7 @@ angular.module("ang-drag-drop",[])
119
119
e . dataTransfer . setData ( "dataToSend" , sendData ) ;
120
120
currentData = angular . fromJson ( sendData ) ;
121
121
e . dataTransfer . effectAllowed = "copyMove" ;
122
- $rootScope . $broadcast ( "ANGULAR_DRAG_START" , sendChannel , sendData ) ;
122
+ $rootScope . $broadcast ( "ANGULAR_DRAG_START" , sendChannel , currentData . data ) ;
123
123
}
124
124
else {
125
125
e . preventDefault ( ) ;
@@ -150,6 +150,11 @@ angular.module("ang-drag-drop",[])
150
150
e . stopPropagation ( ) ;
151
151
}
152
152
153
+ var fn = $parse ( attr . uiOnDragOver ) ;
154
+ scope . $apply ( function ( ) {
155
+ fn ( scope , { $event : e , $channel : dropChannel } ) ;
156
+ } ) ;
157
+
153
158
e . dataTransfer . dropEffect = e . shiftKey ? 'copy' : 'move' ;
154
159
return false ;
155
160
}
@@ -170,6 +175,11 @@ angular.module("ang-drag-drop",[])
170
175
} ) ;
171
176
element . removeClass ( dragHoverClass ) ;
172
177
}
178
+
179
+ var fn = $parse ( attr . uiOnDragLeave ) ;
180
+ scope . $apply ( function ( ) {
181
+ fn ( scope , { $event : e , $channel : dropChannel } ) ;
182
+ } ) ;
173
183
}
174
184
175
185
function onDragEnter ( e ) {
@@ -182,6 +192,11 @@ angular.module("ang-drag-drop",[])
182
192
}
183
193
dragging ++ ;
184
194
195
+ var fn = $parse ( attr . uiOnDragEnter ) ;
196
+ scope . $apply ( function ( ) {
197
+ fn ( scope , { $event : e , $channel : dropChannel } ) ;
198
+ } ) ;
199
+
185
200
$rootScope . $broadcast ( "ANGULAR_HOVER" , dragChannel ) ;
186
201
scope . $apply ( function ( ) {
187
202
customDragLeaveEvent ( scope , { $event : e } ) ;
0 commit comments