-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove jQuery dependency #55
Conversation
- 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
This is a wonderful PR :) 👍 |
Looks good thanks, does it work ok in angular 1.3? |
Remove jQuery dependency
Sorry, but these lines of code do not work on my project. //_mx = (evt.pageX || evt.touches[0].pageX); |
Sorry I missed those. 'originalEvent' is a jQuery-ism I think. I don't On Fri, Jan 9, 2015 at 4:28 AM, J.Trotoux notifications@github.com wrote:
|
I did comment the 2 lines to confirm the problem was here. http://caniuse.com/#feat=touch |
I added .originalEvent and it works. |
👍 It'd be great not to have to include jQuery just for this. |
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