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
I am trying to use your HummerJS in Angular 4.3.6. The problem that i have is with pan gesture. He perfectly works when you moving element left and right, but when you try to do the same with up and down, it has delay. I tested it on Iphone 5s ( IOS 10 ), and in mobile view in Chrome ( Nexus 5x).
I saw after that you have same problem on your web tutorial. ( https://saschwarz.github.io/angular2-gestures-slides/#/8 ).
Thanks for the answer!
Best regards,
David
The text was updated successfully, but these errors were encountered:
I don't have time to look at it now, but it is likely because I don't have the pan direction set to all. Here's some code I use in one of my Ionic apps to set up the default Hammer pan to work in all directions:
import { HAMMER_GESTURE_CONFIG, HammerGestureConfig } from '@angular/platform-browser';
import {
DIRECTION_HORIZONTAL,
DIRECTION_LEFT,
DIRECTION_RIGHT,
DIRECTION_VERTICAL
} from 'ionic-angular/gestures/hammer';
// You won't have this import in plain Angular, it might be somewhere though. Otherwise look in the hammer source for these and replace with the binary or of their values I seem to recall it might be 31????
export class HammerConfig extends HammerGestureConfig {
// by default only vertical pan is enabled
overrides = {
pan: {
enable: true,
threshold: 1,
direction: DIRECTION_HORIZONTAL | DIRECTION_LEFT | DIRECTION_RIGHT | DIRECTION_VERTICAL
}
}
}
// in your providers:
{
provide: HAMMER_GESTURE_CONFIG,
useClass: HammerConfig
}
Hi,
I am trying to use your HummerJS in Angular 4.3.6. The problem that i have is with pan gesture. He perfectly works when you moving element left and right, but when you try to do the same with up and down, it has delay. I tested it on Iphone 5s ( IOS 10 ), and in mobile view in Chrome ( Nexus 5x).
I saw after that you have same problem on your web tutorial. ( https://saschwarz.github.io/angular2-gestures-slides/#/8 ).
Thanks for the answer!
Best regards,
David
The text was updated successfully, but these errors were encountered: