Mercurial > hg > webaudioevaluationtool
changeset 3069:a03408cd1fde
WIP #122. Try re-organising touch events
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Tue, 31 Oct 2017 21:55:34 +0000 |
parents | edeeff75ed19 |
children | 1f92be08fadd |
files | interfaces/ape.js |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Tue Oct 31 21:49:26 2017 +0000 +++ b/interfaces/ape.js Tue Oct 31 21:55:34 2017 +0000 @@ -350,6 +350,7 @@ trackObj.removeEventListener("mouseup"); trackObj.removeEventListener("touchstart"); trackObj.removeEventListener("touchend"); + trackObj.removeEventListener("touchcancel"); } var timing = undefined; this.handleEvent = function (e) { @@ -359,7 +360,7 @@ } if (e.type == "mousedown" || e.type == "touchstart") { axisInterface.mousedown(this); - } else if (e.type == "mouseup" || e.type == "touchend") { + } else if (e.type == "mouseup" || e.type == "touchend" || e.type == "touchcancel") { axisInterface.mouseup(this); metric.moved(audioEngineContext.timer.getTestTime(), this.value); console.log("Slider " + label + " on axis " + axisInterface.name + " moved to " + this.value);