Mercurial > hg > webaudioevaluationtool
comparison js/core.js @ 2349:ceaccbd708cb
Hotfix: APE sticky markers should be fixed now. Caused by improper indexing of metric trackers if outside-reference was not at the end.
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 16 May 2016 13:30:41 +0100 |
parents | 7de03d416f38 |
children | ce406455f25b |
comparison
equal
deleted
inserted
replaced
2347:7de03d416f38 | 2349:ceaccbd708cb |
---|---|
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); |