Ionic 5 - Angular listen to pinch gesture

Viewed 276

I am updating an Ionic 3 application to Ionic 5. In my app I use

         this.gesture = new Gesture(this.myElement.nativeElement);
     
         this.gesture.listen();
   
         this.gesture.on('pinchend', pinchEvent => {
           const scale = pinchEvent.scale;
           ......

         });

this ultimately to control the zoom of the camera.

In Ionic 5 the angular Gesture is not an option anymore so I tried to use the new Gesture Controller following the official docs but I cannot get the data I need (scale of the pinch), I think it does not support 2 fingers gesture.

How can I listen to the pinch gesture in Ionic 5 and get information on the scale of the pinch event?

0 Answers
Related