Mercurial > hg > webaudioevaluationtool
changeset 3071:afb1de9be046
#122 Better catch-all for touchmove/end/cancel
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Tue, 31 Oct 2017 22:07:53 +0000 |
parents | 1f92be08fadd |
children | 2dcf6aaa7c4c |
files | interfaces/ape.js |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Tue Oct 31 22:01:29 2017 +0000 +++ b/interfaces/ape.js Tue Oct 31 22:07:53 2017 +0000 @@ -332,6 +332,8 @@ trackObj.addEventListener("mousedown", this); trackObj.addEventListener("mouseup", this); trackObj.addEventListener("touchstart", this); + trackObj.addEventListener("touchend", this); + trackObj.addEventListener("touchcancel", this); trackObj.classList.remove("track-slider-disabled"); labelHolder.textContent = label; } @@ -366,7 +368,7 @@ metric.moved(audioEngineContext.timer.getTestTime(), this.value); console.log("Slider " + label + " on axis " + axisInterface.name + " moved to " + this.value); } else if (e.type == "touchmove") { - axisInterface.handleEvent(e); + //axisInterface.handleEvent(e); } } this.clicked = function (e) { @@ -640,6 +642,7 @@ return ""; } sliderRail.addEventListener("mousemove", this); + sliderRail.addEventListener("touchmove", this); Object.defineProperties(this, { "sliderRail": { "value": sliderRail