简体   繁体   English

捏科尔多瓦

[英]Pinch zoom in Cordova

I have a html page containing divs. 我有一个包含div的html页面。 Each divs contains some information. 每个div包含一些信息。

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. 当某人pinch zooms div时 ,该特定div应该扩展/缩放以显示更多信息。

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. 简而言之,我想拥有与Google地图相同的行为。

So my question is, which javascript library should I use to implement this. 所以我的问题是,我应该使用哪个JavaScript库来实现此目的。

You can use: Hammer.js 您可以使用: Hammer.js

Hammer is a open-source library that can recognize gestures made by touch, mouse and pointerEvents. Hammer是一个开放源代码库,可以识别由触摸,鼠标和pointerEvents做出的手势。 It doesn't have any dependencies, and it's small, only 3.96 kB minified + gzipped! 它没有任何依赖性,而且很小,只有3.96 kB的最小空间+ gzip压缩!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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