Mercurial > hg > webaudioevaluationtool
diff core.js @ 888:a17a380e2469
Implementing Features #1271 and #1272
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Tue, 16 Jun 2015 17:19:51 +0100 |
parents | a2ab04daf4c9 |
children | 716cd1efe64c |
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) {