You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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?
The text was updated successfully, but these errors were encountered:
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?
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
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?
The text was updated successfully, but these errors were encountered: