# HG changeset patch # User Nicholas Jillings # Date 1492943554 -3600 # Node ID 35037fb7a8431df97dbbf11e15a35d4fe840d21c # Parent b4735c529a8efaefac4e7f4dc054732530992640 #133 Added fragment images to APE diff -r b4735c529a8e -r 35037fb7a843 interfaces/ape.js --- 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) {