(e)
| 291 | } |
| 292 | |
| 293 | function onDrop(e) { |
| 294 | if(e.originalEvent) { |
| 295 | e.dataTransfer = e.originalEvent.dataTransfer; |
| 296 | } |
| 297 | |
| 298 | if (e.preventDefault) { |
| 299 | e.preventDefault(); // Necessary. Allows us to drop. |
| 300 | } |
| 301 | if (e.stopPropagation) { |
| 302 | e.stopPropagation(); // Necessary. Allows us to drop. |
| 303 | } |
| 304 | |
| 305 | var sendData = e.dataTransfer.getData('text'); |
| 306 | sendData = angular.fromJson(sendData); |
| 307 | |
| 308 | var dropOffset = calculateDropOffset(e); |
| 309 | |
| 310 | var position = dropOffset ? { |
| 311 | x: dropOffset.x - sendData.offset.x, |
| 312 | y: dropOffset.y - sendData.offset.y |
| 313 | } : null; |
| 314 | |
| 315 | determineEffectAllowed(e); |
| 316 | |
| 317 | var uiOnDropFn = $parse(attr.uiOnDrop); |
| 318 | scope.$evalAsync(function() { |
| 319 | uiOnDropFn(scope, {$data: sendData.data, $event: e, $channel: sendData.channel, $position: position}); |
| 320 | }); |
| 321 | element.removeClass(dragEnterClass); |
| 322 | dragging = 0; |
| 323 | } |
| 324 | |
| 325 | function isDragChannelAccepted(dragChannel, dropChannel) { |
| 326 | if (dropChannel === '*') { |
nothing calls this directly
no test coverage detected