Added by: Sam Deering
And Angularjs module to implement HTML5 Drag And Drop behavior.
For better understanding, read at: https://developer.mozilla.org/en-US/docs/DragDrop/Drag_and_Drop
Draggable attribute must contain the model which will be passed to the droppable. e.g
It supports the following attributes as well:
It supports the following attributes:
The draggable and droppable directives don't have an isolated scope as might be expected.
This is done by design because if an isolated scope was set, then inner elements containg the directive wouldn't reach parent scope,
giving undesired results if for example when the directive is being used with a ng-repeat.
This comes with a cost:
In the controller, you will need to use angular.bind or keeping a variable to reference controlelr $scope
since inside the dragging methods you subscribe, they will be called with a different binding.
You might see the word jQuery in the module but in fact, that's needed to make it work with/without jQuery presence.
It depends on Angular.element.
What happens is that if jQuery is present, the bound events will have the dragging real event on the 'originalEvent' property
thus the 'dataTransfer' property wiil be on event if jQuery is not present and on 'event.originalEvent' if it is,
then, for sake of being NO jQuery depending it is being checked and pointing to the right event properties.
Module stats last updated: 2017-04-12 15:00:04