简体   繁体   中英

Pinch zoom in Cordova

I have a html page containing divs. Each divs contains some information.

Name : John Doe           //First div (First-level Information)
Name : Jane Doe           //Second div (First-level Information)
Name : Lorem Ipsum        //Third div (First-level Information)

Originally the information that will be seen is only name of the person. When someone pinch zooms the div that particular div should expand/scale itself to display more information.

Name : John Doe
Age  : 23                 //First div (Second-level Information)
Name : Jane Doe     
Age  : 25                 //Second div (Second-level Information)
Name : Lorem Ipsum    
Age  : 31                 //Third div (Second-level Information)

In short, I want to have same behavior as Google maps have.

So my question is, which javascript library should I use to implement this.

You can use: Hammer.js

Hammer is a open-source library that can recognize gestures made by touch, mouse and pointerEvents. It doesn't have any dependencies, and it's small, only 3.96 kB minified + gzipped!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM