4
我使用Seadragon Ajax和jQuery touch事件監聽器。touchstart阻止按鈕監聽器
該容器具有touchstart,touchmove和綁定到它touchend,繼承人的觸摸開始:
.bind('touchstart MSPointerDown', function(e){
var p = coord(e.originalEvent);
p.start = true;
p.scale = 1;
if(e.originalEvent.pointerType === 4) return;
else if(e.originalEvent.pointerType !== undefined) e.originalEvent.preventMouseEvent();
$(this).data(p);
e.preventDefault();
e.stopPropagation();
})
裏面海龍視圖是生成一些按鈕。這些按鈕不會在平板電腦上觸發,因爲它的容器div上有觸摸開關。它適用於鼠標。
new Seadragon.Button("Click to go", "", "", "", "", null, moveFunction, null, null, null);
我需要檢查,看看是否觸摸是按鈕或不是之前在touchstart功能的所有東西,但真的不知道如何。