Skip to content

Conversation

@blakgeek
Copy link

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.

@blakgeek
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant