触摸苹果设备上的活动

时间:2016-09-29 10:58:46

标签: javascript ios mobile

我使用一些第三方软件从PDF创建交互式书籍。我可以看到它是如何工作的,但我不确定如何使移动/平板电脑版本与Apple设备上的链接完美配合..

初始PDF中包含在其中创建的链接(在Acrobat中完成),然后导入PDF并创建Web版本。 它为这些链接创建的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" }
  }],
[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];

mousedown事件适用于三星设备,但似乎不适用于Apple设备。我会对这种情况感兴趣,但主要是我问是否有人可以帮助如何改变代码以便在有方法的情况下捕获苹果设备?

我能想到的只是......

triggerEventType:"touchstart"

由于

1 个答案:

答案 0 :(得分:1)

尝试touchend事件,
它可能适用于纯JS,因为我在Backbone.js中使用它 它在Backbone.js

中完美运行