Mercurial > hg > webaudioevaluationtool
changeset 2796:35037fb7a843
#133 Added fragment images to APE
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Sun, 23 Apr 2017 11:32:34 +0100 |
parents | b4735c529a8e |
children | 9e060c431ab3 603a34eacccf |
files | interfaces/ape.js |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Sun Apr 23 11:17:05 2017 +0100 +++ b/interfaces/ape.js Sun Apr 23 11:32:34 2017 +0100 @@ -576,6 +576,18 @@ scaleObj.style.left = Math.floor((pixelPosition - ($(scaleObj).width() / 2))) + 'px'; } }; + + this.playing = function (id) { + var node = audioEngineContext.audioObjects.find(function (a) { + return a.id == id; + }); + if (node === undefined) { + this.imageHolder.setImage(interfaceObject.image || ""); + return; + } + var imgurl = node.specification.image || interfaceObject.image || ""; + this.imageHolder.setImage(imgurl); + } } function sliderObject(audioObject, interfaceObjects, index) { @@ -619,6 +631,9 @@ $('.track-slider').addClass('track-slider-disabled'); $('.outside-reference').addClass('track-slider-disabled'); } + interfaceContext.interfaceSliders.forEach(function (ts) { + ts.playing(this.parent.id); + }, this); }; this.stopPlayback = function () { if (this.playing) {