Pinch to increase cordons

how do you implement a pinch to increase for the android project cordova

I have an iframe in which I load my src and I want to implement a pinch to increase the iframe because it takes up the whole screen

+6
source share
1 answer

To be precise, you can achieve a pinch to enlarge it in two ways.

  • If you open the image in your own container, which allows you to scale and pinch - the performance is much better, here you may need the Cordova plugin, which can do this for you, I found https://github.com/keensoft/FullScreenImage-Cordova-Plugin , but I think that it only opens the image in full screen, but does not allow pinching and scaling, you can try
  • If you are not using a plugin, which means that the image is displayed inside the webview, for which you either write code for touch events, or simply use hammer.js, which allows this.
0
source

Source: https://habr.com/ru/post/969640/


All Articles