# HG changeset patch # User Nicholas Jillings # Date 1505223411 -3600 # Node ID f06405eacbe1748f9ede2f80dd3dfd7b68a664ce # Parent 03b0e5dc57e62a7a3cfce05ec09486cc4cfa1549 Re-instate comment boxes in APE #230 diff -r 03b0e5dc57e6 -r f06405eacbe1 interfaces/ape.js --- 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); + } }); } });