Mercurial > hg > webaudioevaluationtool
changeset 2717:723e1e5bae6f
JSHint merges
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 14 Apr 2017 16:12:52 +0100 |
parents | 57ba3f490836 |
children | 65c19c3f45c4 |
files | js/core.js |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Apr 14 16:11:38 2017 +0100 +++ b/js/core.js Fri Apr 14 16:12:52 2017 +0100 @@ -1239,12 +1239,12 @@ // Get the data from Specification var pagePool = []; - for (var page of specification.pages) { + specification.pages.forEach(function(page){ if (page.position !== null || page.alwaysInclude) { page.alwaysInclude = true; } pagePool.push(page); - } + }); if (specification.numPages > 0) { specification.randomiseOrder = true; pagePool = pickSubPool(pagePool, specification.numPages); @@ -1252,22 +1252,22 @@ // Now get the order of pages var fixed = []; - for (var page of pagePool) { + pagePool.forEach(function(page){ if (page.position !== null) { fixed.push(page); var i = pagePool.indexOf(page); pagePool.splice(i, 1); } - } + }); if (specification.randomiseOrder) { pagePool = randomiseOrder(pagePool); } // Place in the correct order - for (var page of fixed) { + fixed.forEach(function(page) { pagePool.splice(page.position, 0, page); - } + }); // Now process the pages pagePool.forEach(function (page, i) {