Mercurial > hg > webaudioevaluationtool
changeset 2322:1f4aa23ae847
Changed alert for scalerange check for AB/ABX interfaces #52
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 29 Apr 2016 17:34:39 +0100 |
parents | ae69e61a6b76 |
children | ff06a00a1c0a 2cc0088b7461 |
files | js/core.js |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Apr 29 16:40:13 2016 +0100 +++ b/js/core.js Fri Apr 29 17:34:39 2016 +0100 @@ -2824,6 +2824,8 @@ var str = "Please keep listening. "; var minRanking = Infinity; var maxRanking = -Infinity; + var interface = page.specification.interface; + var isAb = interface === "AB" || interface === "ABX"; for (var ao of audioObjects) { var rank = ao.interfaceDOM.getValue(); if (rank < minRanking) {minRanking = rank;} @@ -2833,8 +2835,12 @@ str += "At least one fragment must be below the "+min+" mark."; state = false; } - if (maxRanking*100 < max) { - str += "At least one fragment must be above the "+max+" mark." + if (maxRanking*100 < max) { + if(isAb){ // if it is AB or ABX let's phrase it differently + str += "You must select a fragment before continuing"; + } else{ + str += "At least one fragment must be above the "+max+" mark." + } state = false; } if (!state) { @@ -2844,7 +2850,6 @@ } return state; } - this.storeErrorNode = function(errorMessage) { var time = audioEngineContext.timer.getTestTime();