fatlinesofcode / ngDraggable

Drag and drop module for Angular JS
MIT License
631 stars 400 forks source link

$event.stopPropagation(); and ng-prevent-drag #187

Open CrackerakiUA opened 9 years ago

CrackerakiUA commented 9 years ago

I know that you have awesome attribute ng-prevent-drag. But i need to use $event.stopPropagation(); because i have other functionalities under ng-drag area and i want to prevent those in some other area. How can i do that without having Uncaught TypeError: Cannot read property 'preventDefault' of undefined.

df-jsykes commented 8 years ago

For anyone else who gets here, when you pass $event , it appears you need to go one step deeper sometimes.

event = event.event ? event.event : event;
event.stopPropagation();