简体   繁体   English

触摸苹果设备上的事件

[英]touch events on apple devices

I use some third party software which creates an interactive book from a PDF. 我使用了一些第三方软件,这些软件可以通过PDF创建交互式图书。 I can see how it works to a point but am not sure about making the mobile/tablet version work perfectly with links working on Apple devices.. 我可以看到它的工作原理,但是不确定是否可以通过Apple设备上的链接使移动/平板电脑版本完美地工作。

The initial PDF has links created within it (done in Acrobat), the PDF is then imported and the web version created. 初始PDF包含在其中创建的链接(在Acrobat中完成),然后导入PDF并创建Web版本。 The resulting javascript it creates for these links is as follows.. 它为这些链接创建的结果javascript如下。

var pageEditor = [[], [], [], [], [], [], [], [],
[{
      annotype: "com.mobiano.flipbook.pageeditor.TAnnoLink",
      action: {
        triggerEventType: "mouseDown",
        actionType: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenURL",
        url: "http://www.canal30apartments.com/360/viewer/mezz-lower.html"
      },
      location: { x: "0.085024", y: "0.067632", width: "0.184540", height: "0.180675" }
    },
    {
      annotype: "com.mobiano.flipbook.pageeditor.TAnnoLink",
      action: {
        triggerEventType: "mouseDown",
        actionType: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenURL",
        url: "http://www.canal30apartments.com/360/viewer/mezz-upper.html"
      },
      location: { x: "0.764247", y: "0.694682", width: "0.174878", height: "0.180676" }
    }],
[{
    annotype: "com.mobiano.flipbook.pageeditor.TAnnoLink",
    action: {
      triggerEventType: "mouseDown",
      actionType: "com.mobiano.flipbook.pageeditor.TAnnoActionOpenURL",
      url: "http://www.canal30apartments.com/360/viewer/standard.html"
    },
    location: { x: "0.759417", y: "0.556518", width: "0.184540", height: "0.182609" }
  }],
[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];

The mousedown event works on a Samsung device, but doesn't seem to work on Apple devices. mousedown事件在Samsung设备上起作用,但在Apple设备上似乎不起作用。 I'd be interested as to whty this happens but mainly i'm asking if anyone could help as to how to alter the code to catch apple devices if there is a way? 我对发生这种情况感兴趣,但主要是我想问是否有人可以帮助更改代码以捕获苹果设备?

All I could think of is.. 我所能想到的是..

triggerEventType:"touchstart"

Thanks 谢谢

Try touchend Event, 尝试touchend事件,
It might work on pure JS as I am using it in Backbone.js 当我在Backbone.js使用它时,它可能适用于纯JS
And it works perfectly in Backbone.js 它在Backbone.js完美运行

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

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