comparison interfaces/ape.js @ 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 03b9e845f730
children 1620cbee9111
comparison
equal deleted inserted replaced
3018:03b0e5dc57e6 3019:f06405eacbe1
227 var playing = false; 227 var playing = false;
228 var sliders = []; 228 var sliders = [];
229 this.enable = function () { 229 this.enable = function () {
230 sliders.forEach(function (s) { 230 sliders.forEach(function (s) {
231 s.enable(); 231 s.enable();
232 }) 232 });
233 } 233 }
234 234
235 this.updateLoading = function (p) { 235 this.updateLoading = function (p) {
236 sliders.forEach(function (s) { 236 sliders.forEach(function (s) {
237 s.updateLoading(p); 237 s.updateLoading(p);
238 }) 238 });
239 } 239 }
240 240
241 this.startPlayback = function () { 241 this.startPlayback = function () {
242 playing = true; 242 playing = true;
243 sliders.forEach(function (s) { 243 sliders.forEach(function (s) {
606 } 606 }
607 this.initialisePage = function (page_init) { 607 this.initialisePage = function (page_init) {
608 this.clear(); 608 this.clear();
609 page = page_init; 609 page = page_init;
610 var interfaceObj = interfaceContext.getCombinedInterfaces(page); 610 var interfaceObj = interfaceContext.getCombinedInterfaces(page);
611 var commentBoxes = false;
611 // Create each of the interface axis 612 // Create each of the interface axis
612 interfaceObj.forEach(function (i) { 613 interfaceObj.forEach(function (i) {
613 var node = new axisObject(i, this); 614 var node = new axisObject(i, this);
614 axis.push(node); 615 axis.push(node);
616 i.options.forEach(function (o) {
617 if (o.type == "show" && o.name == "comments") {
618 commentBoxes = true;
619 }
620 });
615 }, this); 621 }, this);
616 622
617 // Create the audioObject interface objects for each aO. 623 // Create the audioObject interface objects for each aO.
618 page.audioElements.forEach(function (element, index) { 624 page.audioElements.forEach(function (element, index) {
619 var audioObject = audioEngineContext.newTrack(element); 625 var audioObject = audioEngineContext.newTrack(element);
628 axis.forEach(function (a) { 634 axis.forEach(function (a) {
629 var node = a.addSlider(aoi); 635 var node = a.addSlider(aoi);
630 node.setLabel(label); 636 node.setLabel(label);
631 aoi.addSlider(node); 637 aoi.addSlider(node);
632 audioObject.bindInterface(aoi); 638 audioObject.bindInterface(aoi);
639 if (commentBoxes) {
640 interfaceContext.commentBoxes.createCommentBox(audioObject);
641 }
633 }); 642 });
634 } 643 }
635 }); 644 });
636 } 645 }
637 this.checkAllMoved = function () { 646 this.checkAllMoved = function () {