Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical PANMOVE is not recognized #1164

Open
mburger81 opened this issue Feb 7, 2018 · 2 comments
Open

Vertical PANMOVE is not recognized #1164

mburger81 opened this issue Feb 7, 2018 · 2 comments

Comments

@mburger81
Copy link

We use ionic which is as you probably know using hammer.js to detecting touch gestures. They for default disabled DIRECTION_ALL and does allow only horizontal move. They are doing this to get work scrolling on mobile devices.

We try to do a DRAG & DROP behavior for what we registered PRESS and PANMOVE listener to HAMMER.JS, like this

this.hammer = new window['Hammer'](this.srcElement);
this.hammer.on('press', (ev) => {
   .....
});

this.hammer.on('panmove', (ev) => {
.....
});

We register to PRESS event, because only after this we enable DRAG & DROP behavior and set DIRECTION_ALL to HTMLELEMENT
this.hammer.get('pan').set({ direction: window['Hammer'].DIRECTION_ALL });

This is working well on desktop browser but have some problems on mobile devices. The problems is there, if our first move is to the LEFT or to the RIGHT (horizontal) anything is working well and we can DRAG the ELEMENT all over the screen, but if our first move is UP or DOWN (vertical) the panmove event is not fired and the behavior is broken.

So it seems on mobile devices changing on the fly the allowed DIRECTION and the PANMOVE are not working well, or as expected.

Do you have some idea, what could be the problem and what we could do?

@KevinZyz
Copy link

I had the same issue, could you solve it?

@mburger81
Copy link
Author

mburger81 commented Mar 30, 2018

No sorry, we wasn't abletto resolve this. We use hammer.js in an ionic app. We get no support neither from this channel nor from ionic forum/issue. We tried many things but nothing worked.

where do you use hammer.js? Do you think you can try to figure out a solution?

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

No branches or pull requests

2 participants