Open blakgeek opened 8 years ago
Usage would be as follows.
<div hm-tap="foo"
hm-doubletap="bar"
hm-require-failure"{tap: 'doubletap', 'doubletap': ['pan', 'zoom']}">
</div>
This would cancel tap on doubletap. Since the pan and zoom gestures aren't registered they are ignored and a warning is logged to the console. The quotes around the key event name is optional.
The existing requireFailure implementation doesn't always work because each gesture is a separate directive and not guaranteed to have been added to hammer instance. I added a new directive with higher priority to ensure that runs after all gestures have been added.