vuejs / vue-touch

Hammer.js wrapper for Vue.js
MIT License
2.72k stars 391 forks source link

no dom events on v-touch component #116

Closed undefinederror closed 6 years ago

undefinederror commented 6 years ago

Hi, it seems that DOM events don't fire on the v-touch instance.

Specifically, I am interested in @mousemove

I have tried passing :options="{domEvents:true}" but that doesn't seem to make any difference (btw, I think in the README it is missing the colon in front of "options")

How would I go about registering mouse events on the v-touch instance?

Thank you

undefinederror commented 6 years ago

wow. ok that made no sense. my bad.. :(

I write here what is wrong with my question above for others' reference

1) DOM events don't fire on any component. For that there is the native modifier

2) :options="{domEvents:true}" isn't for extending the range of events hammerjs will recognize, but for extending the event object passed in the handlers, so to allows e.preventDefault and such