comparison interfaces/ABX.js @ 2880:9bbf97cd736d

Fix for #204
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 26 Jun 2017 11:00:52 +0100
parents 64a5603831e2
children cd1cd3358544
comparison
equal deleted inserted replaced
2879:061336f961de 2880:9bbf97cd736d
12 // holding div's, or setting up any nodes which are present for the entire test sequence 12 // holding div's, or setting up any nodes which are present for the entire test sequence
13 13
14 interfaceContext.insertPoint.innerHTML = ""; // Clear the current schema 14 interfaceContext.insertPoint.innerHTML = ""; // Clear the current schema
15 15
16 // Custom comparator Object 16 // Custom comparator Object
17 Interface.prototype.comparator = null; 17 interfaceContext.comparator = null;
18 18
19 // The injection point into the HTML page 19 // The injection point into the HTML page
20 interfaceContext.insertPoint = document.getElementById("topLevelBody"); 20 interfaceContext.insertPoint = document.getElementById("topLevelBody");
21 var testContent = document.createElement('div'); 21 var testContent = document.createElement('div');
22 testContent.id = 'testContent'; 22 testContent.id = 'testContent';
373 node = buildElement.call(this, index, audioEngineContext.newTrack(element)); 373 node = buildElement.call(this, index, audioEngineContext.newTrack(element));
374 this.pair.push(node); 374 this.pair.push(node);
375 this.boxHolders.appendChild(node.box); 375 this.boxHolders.appendChild(node.box);
376 }, this); 376 }, this);
377 var elementId = Math.floor(Math.random() * 2); //Randomly pick A or B to be X 377 var elementId = Math.floor(Math.random() * 2); //Randomly pick A or B to be X
378 var element = new page.audioElementNode(specification); 378 var element = page.addAudioElement();
379 for (var atr in page.audioElements[elementId]) { 379 for (var atr in page.audioElements[elementId]) {
380 element[atr] = page.audioElements[elementId][atr]; 380 element[atr] = page.audioElements[elementId][atr];
381 } 381 }
382 element.id += "-X"; 382 element.id += "-X";
383 if (typeof element.name == "string") { 383 if (typeof element.name == "string") {