キャンバス内でのシングルタッチを防ぐ必要があります。ただし、ダブル/マルチタッチシャウチは、IOSアプリケーションでは問題なく動作するはずです。
タッチイベントのJSコードを見つけてください
onTouchStart: function(e, win, eventInfo) {
if(!this.config.panning) return;
if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
this.pressed = true;
this.pos = eventInfo.getPos();
var canvas = this.canvas,
ox = canvas.translateOffsetX,
oy = canvas.translateOffsetY,
sx = canvas.scaleOffsetX,
sy = canvas.scaleOffsetY;
this.pos.x *= sx;
this.pos.x += ox;
this.pos.y *= sy;
this.pos.y += oy;
},
onTouchMove: function(e, win, eventInfo) {
if(!this.config.panning) return;
if(!this.pressed) return;
if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
var thispos = this.pos,
currentPos = eventInfo.getPos(),
canvas = this.canvas,
ox = canvas.translateOffsetX,
oy = canvas.translateOffsetY,
sx = canvas.scaleOffsetX,
sy = canvas.scaleOffsetY;
currentPos.x *= sx;
currentPos.y *= sy;
currentPos.x += ox;
currentPos.y += oy;
var x = currentPos.x - thispos.x,
y = currentPos.y - thispos.y;
this.pos = currentPos;
this.canvas.translate(x * 1/sx, y * 1/sy);
},
onTouchEnd: function(e, win, eventInfo) {
if(!this.config.panning) return;
this.pressed = false;
},
onTouchCancel: function(e, win, eventInfo) {
if(!this.config.panning) return;
this.pressed = false;
}
上記のコードから、シングルタッチとマルチタッチの両方が実行されましたが、IOSアプリのキャンバス内でシングルタッチのみを実行したいと思います。ご意見をお聞かせください!