Closed fidoboy closed 9 years ago
You can use standard DOM traversals to get to the parent or child element that has actually registered for the event. Does this address your problem, or am I missing something?
I already know that, but it could be a bit complex depending on the DOM structure. I was asking because I thought that the angular directive could expose the element in some way...
event.element = element before the scope.apply could solve this problem and this way expose the object allowing to use it from the app controller.
That was exactly what I was just thinking. I'll take a look at it later today.
In the meantime, check out the srcEvent object: http://hammerjs.github.io/api/#event-object
That might get you what you want, though I haven't actually tried to verify that at all.
I can get the target element (using event.target) but how can i get the element where the hammer directive is located? Thanks