I implemented a variation of the swipe event handling provided by http://padilicious.com/code/touchevents/index.html Demo: http://padilicious.com/code/touchevents/basicswipe.html
I changed the code to scroll through a number of images (20 - 200) based on a one finger swipe. In order to achieve this you have to override default events using event.preventDefault();
My problem is that I would like to enable defaults on a two finger swipe or pinch zoom. If that isn't possible, how would I manually capture the pinch zoom gesture to enable开发者_StackOverflow中文版 zooming?
Thanks, g
Details regarding your problem are sparse. But if I understand you correctly then you should be able to change your code so it only calls "event.preventDefault()" if "event.touches.length == 1".
"event.touches.length" will have the value of 2 if multiple fingers are touching the screen.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论