Mercurial > hg > webaudioevaluationtool
changeset 2350:1ab42e36b6c8
Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool
author | www-data <www-data@sucuk.dcs.qmul.ac.uk> |
---|---|
date | Mon, 16 May 2016 14:20:50 +0100 |
parents | 0c03d92dc27c (current diff) ceaccbd708cb (diff) |
children | 95dc0833eb0a |
files | |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Mon May 16 11:22:35 2016 +0100 +++ b/interfaces/ape.js Mon May 16 14:20:50 2016 +0100 @@ -351,7 +351,7 @@ currentTestHolder = document.createElement('audioHolder'); currentTestHolder.id = audioHolderObject.id; currentTestHolder.repeatCount = audioHolderObject.repeatCount; - + // Find all the audioElements from the audioHolder $(audioHolderObject.audioElements).each(function(index,element){ // Find URL of track
--- a/js/core.js Mon May 16 11:22:35 2016 +0100 +++ b/js/core.js Mon May 16 14:20:50 2016 +0100 @@ -1085,10 +1085,20 @@ if (this.currentStateMap == null) { this.currentStateMap = this.stateMap[this.stateIndex]; + // Find and extract the outside reference + var elements = [], ref = null; + for (var elem of this.currentStateMap.audioElements) { + if (elem.type == "outside-reference") {ref = elem;} + else {elements.push(elem);} + } if (this.currentStateMap.randomiseOrder) { - this.currentStateMap.audioElements = randomiseOrder(this.currentStateMap.audioElements); + this.currentStateMap.audioElements = randomiseOrder(elements); } + if (ref != null) + { + this.currentStateMap.audioElements.push(ref); + } this.currentStore = storage.testPages[this.stateIndex]; if (this.currentStateMap.preTest != null) {