-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Trying mobile multitouch support, I've notice this unpredictable behaviour. Sometimes touchend is called, sometimes is not, and sometimes is called in a wrong x,y. Test code below and try it on mobile.
The code in the docs (handling multitouch in render()) runs perfectly, but there's no easy way to know if a touch starts or ends.
Tested on iPad mini (ios 7.1.2) and Nexus7 (android 5.0.2). On the nexus, where the frame rate is lower, the effect is worse.
var app = playground({
ready: function(){
this.layer.clear('#000').strokeStyle('#f00');
},
touchstart: function(ev) {
this.layer.fillStyle("#0f0").fillCircle(ev.x, ev.y, 5);
},
touchmove: function(ev) {
this.layer.fillStyle("#fff").fillCircle(ev.x, ev.y, 2);
},
touchend: function(ev) {
this.layer.strokeCircle(ev.x, ev.y, 20); // <------ !!!
}
});Metadata
Metadata
Assignees
Labels
No labels