bsdfzzzy / vue2-hammer

Hammer.js wrapper for Vue 2.x to support some touching operation in the mobile.
MIT License
253 stars 48 forks source link

Surely HammerOptions should be __hammerConfig? #35

Open sinemacula opened 5 years ago

sinemacula commented 5 years ago

I have searched the entire repository and am unable to find any reference to hammerOptions. Surely this is meant to be __hammerConfig?

See the following line:

const localOptions = el.hammerOptions && el.hammerOptions[recognizerType];

Should be:

const localOptions = el.__hammerConfig && el.__hammerConfig[recognizerType];

Otherwise localOptions is redundant is it not?

zjffun commented 4 years ago

I'm also find that, but el.__hammerConfig can't directly use as Hammer option.

Should we use ref get DOM and set localOptions?

ptandler commented 4 years ago

Related to #29 - in case this would be fixed, is there any way to actually set el.__hammerConfig (or el.hammerOptions?

parkyh1974 commented 4 years ago

I need more detailed information to use config. Is there any detailed information?

ptandler commented 4 years ago

I ended up importing hammerjs directly to configure global options, see https://github.com/ptandler/enneagram-explorer/blob/master/src/main.ts