Reputation: 9664
I have this super simple hammer.js example which works with the 'tap' event but not with 'dragstart'. I cant seem to figure out why.
<div id="test_el" draggable="true">HIT ME</div>
-
var element = document.getElementById('test_el');
var hammertime = Hammer(element).on("dragstart", function(event) {
alert('hello!');
});
if the event is changed to tap, it works. But hammer lists dragstart as an event here. https://github.com/hammerjs/hammer.js/wiki/Getting-Started#gesture-events
Any ideas why this would not work?
Upvotes: 1
Views: 874
Reputation: 14283
If you are using hammerjs v2 (the new one) drag support has been dropped.
The available events are the following:
Pan
Pinch
Press
Rotate
Swipe
Tap
and the new documentation is here: http://hammerjs.github.io/getting-started/
Upvotes: 2