如何模拟Google Chrome中的缩放缩放? [英] How to simulate pinch zoom in Google Chrome?

查看:686
本文介绍了如何模拟Google Chrome中的缩放缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为使用JavaScript编写的移动应用程序开发缩放功能,并且我想使用移动设备仿真功能在Google Chrome中测试此功能。但我无法找到一种测试捏手势的方法。



我尝试了所有可以在互联网上找到的东西(按住Shift并移动鼠标,按住Alt键并移动鼠标),但没有一个工作。在谷歌浏览器中是否有本地方式来模拟缩放手势?



btw我使用谷歌浏览器的MacOs版本59.0.3071.86 p>

解决方案

Shift +鼠标点击&拖过视口



适用于我。唯一的问题是, touchstart 事件将为 originalEvent.touches 1 $ c>


I'm developing a pinch zoom feature for a mobile app written in javascript and I want to test this in Google Chrome with the mobile device emulation feature. But I cannot find a way to test a pinch gesture.

I tried everything I could find on the internet (pressing Shift and moving the mouse, pressing Alt and moving the mouse), but none of this worked. Is there even a "native" way in Google Chrome to simulate a pinch zoom gesture?

btw I'm using the MacOs version of Google Chrome version 59.0.3071.86

解决方案

Shift + mouse click & drag across the viewport

Works for me. Only problem is that the touchstart event will return 1 for originalEvent.touches

这篇关于如何模拟Google Chrome中的缩放缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆