Ionic v2 Pinch doesn't trigger?


#1

(pinch)=“pinchEvent($event)”


#2

This looks relevant.


#3

Thanks @rapropos, I did try this last week. Seemed to work but was quite laggy in Android device (I had to scroll up and down and pinch works sometimes). Any simple example you could refer us to?


#4

I’ve noticed similar inconsistent behavior, where the pinchcancel or pinchend event got fired “without a reason”. The laggy part most likely comes from the view still being able to scroll. Conditionally adding a CSS class to <ion-content>, that sets the overflow-y to hidden, will get rid of the laggyness. Nevertheless, I’d suggest taking a look at my latest comment, there I refer to an article that looks closer to the whole pinch event: Pinch Gesture is not working

<ion-content [class.disable-scrolling]='isScrolling'>
ion-content.disable-scrolling .scroll-content {
    overflow-y: hidden;
}
public onPinchStart(e) {
  this.isScrolling = this.content.isScrolling;
}

public onPinchStart(e) {
  this.isScrolling = false;
}