Mercurial > hg > webaudioevaluationtool
changeset 3019:f06405eacbe1
Re-instate comment boxes in APE #230
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 12 Sep 2017 14:36:51 +0100 |
parents | 03b0e5dc57e6 |
children | 664065577426 |
files | interfaces/ape.js |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Tue Sep 12 14:05:38 2017 +0100 +++ b/interfaces/ape.js Tue Sep 12 14:36:51 2017 +0100 @@ -229,13 +229,13 @@ this.enable = function () { sliders.forEach(function (s) { s.enable(); - }) + }); } this.updateLoading = function (p) { sliders.forEach(function (s) { s.updateLoading(p); - }) + }); } this.startPlayback = function () { @@ -608,10 +608,16 @@ this.clear(); page = page_init; var interfaceObj = interfaceContext.getCombinedInterfaces(page); + var commentBoxes = false; // Create each of the interface axis interfaceObj.forEach(function (i) { var node = new axisObject(i, this); axis.push(node); + i.options.forEach(function (o) { + if (o.type == "show" && o.name == "comments") { + commentBoxes = true; + } + }); }, this); // Create the audioObject interface objects for each aO. @@ -630,6 +636,9 @@ node.setLabel(label); aoi.addSlider(node); audioObject.bindInterface(aoi); + if (commentBoxes) { + interfaceContext.commentBoxes.createCommentBox(audioObject); + } }); } });