# HG changeset patch # User Nicholas Jillings # Date 1504701623 -3600 # Node ID 4ae62d4c5c6d2e19a1f6963ddb9f368315361fb9 # Parent 029b0ebc299a1bf4abb9d265c590e2b84cc5ab25 Potential fix for #226. WIP for #225 diff -r 029b0ebc299a -r 4ae62d4c5c6d js/core.js --- a/js/core.js Wed Sep 06 12:17:14 2017 +0100 +++ b/js/core.js Wed Sep 06 13:40:23 2017 +0100 @@ -678,9 +678,10 @@ table.className = "popup-option-list"; table.border = "0"; node.response = []; + var nodelist = []; node.specification.options.forEach(function (option, index) { var tr = document.createElement("tr"); - table.appendChild(tr); + nodelist.push(tr); var td = document.createElement("td"); tr.appendChild(td); var input = document.createElement('input'); @@ -703,6 +704,12 @@ } index++; }); + if (node.specification.randomise) { + nodelist = randomiseOrder(nodelist); + } + nodelist.forEach(function (e) { + table.appendChild(e); + }); this.popupResponse.appendChild(table); } @@ -1969,13 +1976,15 @@ // Safari does not like using 'this' to reference the calling object! //event.currentTarget.owner.metric.stopListening(audioEngineContext.timer.getTestTime(),event.currentTarget.owner.getCurrentPosition()); if (event.currentTarget !== null) { - event.currentTarget.owner.stop(audioContext.currentTime + 1); + event.currentTarget.owner.stop(audioContext.currentTime + 0.1); } }; this.outputGain.gain.cancelScheduledValues(audioContext.currentTime); if (!audioEngineContext.loopPlayback || !audioEngineContext.synchPlayback) { this.metric.startListening(audioEngineContext.timer.getTestTime()); - this.outputGain.gain.linearRampToValueAtTime(this.onplayGain, startTime + specification.crossFade); + if (this.outputGain.gain.value !== this.onplayGain) { + this.outputGain.gain.linearRampToValueAtTime(this.onplayGain, startTime + Number(specification.crossFade)); + } this.interfaceDOM.startPlayback(); } else { this.outputGain.gain.linearRampToValueAtTime(0.0, startTime); diff -r 029b0ebc299a -r 4ae62d4c5c6d tests/examples/APE_example.xml --- a/tests/examples/APE_example.xml Wed Sep 06 12:17:14 2017 +0100 +++ b/tests/examples/APE_example.xml Wed Sep 06 13:40:23 2017 +0100 @@ -2,24 +2,24 @@ - + Please enter your name. - - + + Please select with which activities you have any experience (example checkbox question) - - + + What instrument did you play - - + + This is an example of an 'APE'-style test, with two pages, using the test stimuli in 'example_eval/'. - +