简体   繁体   English

使用Microsoft Tablet /触摸屏显示器上的mozilla firefox禁用默认捏缩放

[英]Disable default pinch to zoom using mozilla firefox on Microsoft Tablet/ Touch screen monitor

Well, my requirement is to zoom and pan the svg in all devices/all browsers. 好吧,我的要求是在所有设备/所有浏览器中缩放和平移svg。 I have implemented it with using panzoom.js. 我使用panzoom.js实现了它。

Now, i am facing an issue with Mozilla firefox in tablet and windows touch screen monitor. 现在,我在平板电脑和Windows触摸屏显示器上面临着Mozilla firefox的问题。 When i try to pinch and zoom the svg. 当我试图捏和缩放svg。 It doesn't catch my event rather it catches the browser event and uses browsers zoom and zooms the whole page. 它不会捕获我的事件,而是捕获浏览器事件并使用浏览器缩放和缩放整个页面。

I have tried the steps below: I added this meta tag in the head of the html. 我尝试了以下步骤:我在html的头部添加了这个元标记。

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">

I have also tried the following property which works in IE 11 and IE edge. 我也尝试了以下在IE 11和IE边缘工作的属性。

touch-action:none;

Nothing is working in Mozilla. Mozilla什么都没有。

I need to disable the browsers zoom on pinch so that i can implement my functionality. 我需要禁用浏览器缩放捏,以便我可以实现我的功能。

Thanks in advance! 提前致谢!

尝试这个 :

<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,user-scalable=no,minimal-ui,minimum-scale=1.0,maximum-scale=1.0">

You have to disable it through computers setting, 您必须通过计算机设置禁用它,

settings / control panel -> mouse -> device setting -> pinch to zoom -> uncheck checkbox 设置/控制面板 - >鼠标 - >设备设置 - >捏合缩放 - >取消选中复选框

, This is the only possible way you can't do anything with html or javascript ,这是唯一可能无法用html或javascript做任何事情的方法

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

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