Mercurial > hg > webaudioevaluationtool
comparison js/core.js @ 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 | ceaccbd708cb |
children | ce406455f25b |
comparison
equal
deleted
inserted
replaced
2348:0c03d92dc27c | 2350:1ab42e36b6c8 |
---|---|
1083 { | 1083 { |
1084 popup.hidePopup(); | 1084 popup.hidePopup(); |
1085 if (this.currentStateMap == null) | 1085 if (this.currentStateMap == null) |
1086 { | 1086 { |
1087 this.currentStateMap = this.stateMap[this.stateIndex]; | 1087 this.currentStateMap = this.stateMap[this.stateIndex]; |
1088 // Find and extract the outside reference | |
1089 var elements = [], ref = null; | |
1090 for (var elem of this.currentStateMap.audioElements) { | |
1091 if (elem.type == "outside-reference") {ref = elem;} | |
1092 else {elements.push(elem);} | |
1093 } | |
1088 if (this.currentStateMap.randomiseOrder) | 1094 if (this.currentStateMap.randomiseOrder) |
1089 { | 1095 { |
1090 this.currentStateMap.audioElements = randomiseOrder(this.currentStateMap.audioElements); | 1096 this.currentStateMap.audioElements = randomiseOrder(elements); |
1091 } | 1097 } |
1098 if (ref != null) | |
1099 { | |
1100 this.currentStateMap.audioElements.push(ref); | |
1101 } | |
1092 this.currentStore = storage.testPages[this.stateIndex]; | 1102 this.currentStore = storage.testPages[this.stateIndex]; |
1093 if (this.currentStateMap.preTest != null) | 1103 if (this.currentStateMap.preTest != null) |
1094 { | 1104 { |
1095 this.currentStatePosition = 'pre'; | 1105 this.currentStatePosition = 'pre'; |
1096 popup.initState(this.currentStateMap.preTest,storage.testPages[this.stateIndex].preTest); | 1106 popup.initState(this.currentStateMap.preTest,storage.testPages[this.stateIndex].preTest); |