Mercurial > hg > webaudioevaluationtool
comparison interfaces/ape.js @ 3064:a504a17dcf9f
Fix some lingering APE.js issues with movement trackers
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 31 Oct 2017 16:44:53 +0000 |
parents | 6b95437ae672 |
children | ffd7042c64b2 |
comparison
equal
deleted
inserted
replaced
3063:6b95437ae672 | 3064:a504a17dcf9f |
---|---|
358 } | 358 } |
359 if (e.type == "mousedown" || e.type == "touchstart") { | 359 if (e.type == "mousedown" || e.type == "touchstart") { |
360 axisInterface.mousedown(this); | 360 axisInterface.mousedown(this); |
361 } else if (e.type == "mouseup") { | 361 } else if (e.type == "mouseup") { |
362 axisInterface.mouseup(this); | 362 axisInterface.mouseup(this); |
363 metric.moved(audioEngineContext.timer.getTestTime(), this.value); | |
364 console.log("Slider " + label + " on axis " + axisInterface.name + " moved to " + this.value); | |
363 } | 365 } |
364 } | 366 } |
365 this.clicked = function (e) { | 367 this.clicked = function (e) { |
366 AOI.clicked(); | 368 AOI.clicked(); |
367 } | 369 } |
572 var move = event.clientX - 6; | 574 var move = event.clientX - 6; |
573 var w = $(sliderRail).width(); | 575 var w = $(sliderRail).width(); |
574 move = Math.max(50, move); | 576 move = Math.max(50, move); |
575 move = Math.min(w, move); | 577 move = Math.min(w, move); |
576 UI.selected.value = (move / w); | 578 UI.selected.value = (move / w); |
577 UI.selected.metric.moved(time, UI.selected.value); | |
578 } else if (event.type == "touchmove") { | 579 } else if (event.type == "touchmove") { |
579 var move = event.originalEvent.targetTouches[0].clientX - 6; | 580 var move = event.originalEvent.targetTouches[0].clientX - 6; |
580 var w = $(event.currentTarget).width(); | 581 var w = $(event.currentTarget).width(); |
581 move = Math.max(50, move); | 582 move = Math.max(50, move); |
582 move = Math.min(w, move); | 583 move = Math.min(w, move); |
583 UI.selected.value = (move / w); | 584 UI.selected.value = (move / w); |
584 UI.selected.metric.moved(time, UI.selected.value); | |
585 } | 585 } |
586 } | 586 } |
587 this.checkAllMoved = function () { | 587 this.checkAllMoved = function () { |
588 var notMoved = sliders.filter(function (s) { | 588 var notMoved = sliders.filter(function (s) { |
589 return !s.hasMoved(); | 589 return !s.hasMoved(); |