Mercurial > hg > webaudioevaluationtool
changeset 215:3cc4088aa6d5 Dev_main
Implementing Features #1271 and #1272
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Tue, 16 Jun 2015 17:19:51 +0100 |
parents | 7c93a516b748 |
children | e69c08e35d83 |
files | core.js example_eval/project.xml |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Tue Jun 16 16:59:08 2015 +0100 +++ b/core.js Tue Jun 16 17:19:51 2015 +0100 @@ -1358,6 +1358,21 @@ this.url = xml.getAttribute('url'); this.id = xml.id; this.parent = parent; + this.anchor = xml.getAttribute('anchor'); + if (this.anchor == 'true') {this.anchor = true;} + else {this.anchor = false;} + + this.reference = xml.getAttribute('reference'); + if (this.reference == 'true') {this.anchor = true;} + else {this.reference = false;} + + if (this.anchor == true && this.reference == true) { + console.log('ERROR - Cannot have one audioElement be both the reference and anchor!') + console.log(this); + console.log('Neither will be enabled'); + this.anchor = false; + this.reference = false; + } }; this.commentQuestionNode = function(xml) {
--- a/example_eval/project.xml Tue Jun 16 16:59:08 2015 +0100 +++ b/example_eval/project.xml Tue Jun 16 17:19:51 2015 +0100 @@ -39,6 +39,8 @@ <check name="fragmentFullPlayback"/> <check name="fragmentMoved"/> <check name="fragmentComments"/> + <anchor>20</anchor> + <reference>80</reference> </interface> </setup> <audioHolder id='test-0' hostURL="example_eval/" sampleRate="44100" randomiseOrder='true' repeatCount='0' loop='true' elementComments='true'> @@ -50,7 +52,7 @@ <scale position="20">20</scale> <commentBoxPrefix>Comment on fragment</commentBoxPrefix> </interface> - <audioElements url="0.wav" id="0"/> + <audioElements url="0.wav" id="0" anchor='true'/> <audioElements url="1.wav" id="1"/> <audioElements url="2.wav" id="2"/> <audioElements url="3.wav" id="3"/>