Mercurial > hg > webaudioevaluationtool
changeset 100:a948850f297b
Currently playing sample red.
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Sat, 16 May 2015 17:52:51 +0100 |
parents | 6b35f18fcae6 |
children | 0c5bcfedf5eb |
files | ape.css ape.js |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ape.css Mon Apr 27 22:18:20 2015 +0100 +++ b/ape.css Sat May 16 17:52:51 2015 +0100 @@ -55,7 +55,7 @@ } div.track-slider { - /* Specify any strcture for the slider objects */ + /* Specify any structure for the slider objects */ position: absolute; height: inherit; width: 12px;
--- a/ape.js Mon Apr 27 22:18:20 2015 +0100 +++ b/ape.js Sat May 16 17:52:51 2015 +0100 @@ -428,7 +428,7 @@ currentTrackOrder = []; audioElements.each(function(index,element){ // Find any blind-repeats - // Not implemented yet, but just incase + // Not implemented yet, but just in case currentTrackOrder[index] = element; }); if (randomise) { @@ -492,6 +492,16 @@ var id = Number(this.id.substr(13,2)); // Maximum theoretical tracks is 99! audioEngineContext.metric.sliderPlayed(id); audioEngineContext.selectedTrack(id); + // Currently playing track red, rest green + document.getElementById('track-slider-'+index).style.backgroundColor = "#FF0000"; + for (var i = 0; i<$(currentTrackOrder).length; i++) + { + if (i!=index) + { + document.getElementById('track-slider-'+i).style.backgroundColor = "rgb(100,200,100)"; + } + + } }; canvas.appendChild(trackSliderObj);