javascript - Detect where drop occured (ng-flow) -
i using ng-flow drag & drop files , upload server. page developing has multiple drop listeners . there way detect on element drop occurred ?
<body ng-app="droptest" flow-init="{target:''}"> <div name="drop1" class="fa fa-paperclip fa-rotate-90 cell small" flow-drop="" title="drag/drop files upload record"></div> <div name="drop2" class="fa fa-paperclip fa-rotate-90 cell small" flow-drop="" title="drag/drop files upload record"></div> </body> $scope.$on('flow::fileadded', function (event, $flow, flowfile) { //how detect whether drop occured on drop1 or drop2? });
i figured out
$scope.$on('flow::fileadded', function (event, $flow, flowfile, elementdetails) { elementdetails.target });
Comments
Post a Comment