fatlinesofcode/ngDraggable — pull request #55 by sh3rndon (2014-12-22 17:59:32+00:00)
Title: Remove jQuery dependency

This is my first fork/pull, so I'm not sure I'm doing this right.

I like this module, but have a jQuery-free app so replaced the jQuery code that was getting dom element dimensions and offset with a private function (_privoffset) in ngDrag and ngDrop directives. I don't like duplication of this function, but not sure of the cleanest way to DRY this up. My hope is that someone else will do it the right way.

Summary of changes
=====================
- removed dependency on jQuery
- inject $window and $document instead of creating local vars for them
- prevent duplicate drop events when element has both ng-drag and ng-drop behavior
- don't move the drag element in the initial press, wait till dragging starts
- don't clobber margin of drag element when moving it