comparison interfaces/AB.js @ 606:65c7223bd817 Dev_main

Merge
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 10 Mar 2016 17:08:10 +0000
parents 640ffb822da1
children 19c17f5fa999 5968678fb4fa
comparison
equal deleted inserted replaced
597:5a3b74e95d4a 606:65c7223bd817
306 if (index == audioHolderObject.outsideReference || element.type == 'outside-reference') 306 if (index == audioHolderObject.outsideReference || element.type == 'outside-reference')
307 { 307 {
308 console.log("WARNING - AB cannot have fixed reference"); 308 console.log("WARNING - AB cannot have fixed reference");
309 } 309 }
310 var audioObject = audioEngineContext.newTrack(element); 310 var audioObject = audioEngineContext.newTrack(element);
311 var node = new this.comparatorBox(audioObject,index,String.fromCharCode(65 + index)); 311 var label;
312 switch(audioObject.specification.parent.label) {
313 case "none":
314 label = "";
315 break;
316 case "number":
317 label = ""+index;
318 break;
319 case "letter":
320 label = String.fromCharCode(97 + index);
321 break;
322 default:
323 label = String.fromCharCode(65 + index);
324 break;
325 }
326 var node = new this.comparatorBox(audioObject,index,label);
312 audioObject.bindInterface(node); 327 audioObject.bindInterface(node);
313 this.comparators.push(node); 328 this.comparators.push(node);
314 this.boxHolders.appendChild(node.box); 329 this.boxHolders.appendChild(node.box);
315 } 330 }
316 return this; 331 return this;