Mercurial > hg > webaudioevaluationtool
changeset 3092:30ba1b9ed867
Merge branch 'vnext' into Dev_main
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 12 Jan 2018 15:46:05 +0000 |
parents | 385bb2e03ab7 (current diff) cb81b0e8d31a (diff) |
children | 95e946ee225b |
files | js/core.js |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Jan 12 15:40:34 2018 +0000 +++ b/js/core.js Fri Jan 12 15:46:05 2018 +0000 @@ -696,7 +696,7 @@ tr = document.createElement('div'); tr.setAttribute('name', 'option'); tr.className = "popup-option-checbox"; - var resp = undefined; + var resp; if (node.response.length > 0) { resp = node.response.find(function (a) { return a.name == option.name; @@ -1267,7 +1267,7 @@ } else { remainder.push(a); } - }) + }); if (page.poolSize > 0 || page.randomiseOrder) { page.randomiseOrder = true; if (page.poolSize === 0) { @@ -2040,9 +2040,9 @@ this.bufferStart = function (startTime) { this.outputGain.gain.cancelScheduledValues(audioContext.currentTime); - if (this.bufferNode && this.bufferNode.state == 0) { + if (this.bufferNode && this.bufferNode.state === 0) { this.bufferNode.state = 1; - if (this.bufferNode.loop == true) { + if (this.bufferNode.loop === true) { this.bufferNode.start(startTime); } else { this.bufferNode.start(startTime, this.specification.startTime || 0, this.specification.stopTime - this.specification.startTime || this.buffer.buffer.duration); @@ -2390,7 +2390,7 @@ throw ("Key must be a singular character"); } var included = this.keys.findIndex(function (k) { - return k.key == key + return k.key == key; }) >= 0; if (included) { throw ("Key " + key + " already bounded!"); @@ -2423,7 +2423,7 @@ function keypress(key) { var index = this.keys.findIndex(function (k) { - return k.key == key + return k.key == key; }); if (index >= 0) { audioEngineContext.play(this.keys[index].audioObject.id); @@ -2434,7 +2434,7 @@ return document.activeElement.className.indexOf("trackComment") >= 0; } if (e.key === " ") { - if (isPlaying() && trackCommentFocus() == false) { + if (isPlaying() && trackCommentFocus() === false) { e.preventDefault(); audioEngineContext.stop(); } @@ -3745,7 +3745,7 @@ // Make the request req.send([hold.innerHTML]); }); - }; + } function keyPromise() { return new Promise(function (resolve, reject) { @@ -3770,7 +3770,7 @@ }; req.send(); - }) + }); } var requestChains = null; @@ -3783,7 +3783,7 @@ return sessionKey; }, "set": function (a) { - throw ("Cannot set read-only property") + throw ("Cannot set read-only property"); } }, "request": { @@ -3824,7 +3824,7 @@ }, "update": { "value": function () { - if (this.key == null || requestChains === undefined) { + if (this.key === null || requestChains === undefined) { throw ("Cannot save as key == null"); } this.parent.root.setAttribute("state", "update"); @@ -3833,7 +3833,7 @@ }, "finish": { "value": function () { - if (this.key == null || requestChains === undefined) { + if (this.key === null || requestChains === undefined) { throw ("Cannot save as key == null"); } this.parent.finish(); @@ -3841,7 +3841,7 @@ console.log("OK"); }, function () { createProjectSave("local"); - }) + }); } } });