Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pinch to zoom cordova

how do you implement pinch to zoom for a cordova android project

I have a iframe in which I am loading my src and I want to implement pinch to zoom on the iframe because it is occupying the whole screen

like image 306
Niranjan Balkrishna Prajapati Avatar asked May 21 '14 13:05

Niranjan Balkrishna Prajapati


1 Answers

To be precise you can achieve pinch to zoom in two ways

  1. If you open the image in a native container which allows zoom and pinch - the performance is far better, here you might need a Cordova plugin which can do that for you, i found https://github.com/keensoft/FullScreenImage-Cordova-Plugin but i think it only opens up the image in full screen natively but doesnt allow pinch and zoom , you can try
  2. If you dont use a plugin which means the image is shown inside the webview, for which you either write code for touch events or simply use hammer.js which allows this.
like image 131
Chandra Sekhar Walajapet Avatar answered Sep 28 '22 07:09

Chandra Sekhar Walajapet