comparison 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
comparison
equal deleted inserted replaced
887:13e79bef8b01 888:a17a380e2469
1356 1356
1357 this.audioElementNode = function(parent,xml) { 1357 this.audioElementNode = function(parent,xml) {
1358 this.url = xml.getAttribute('url'); 1358 this.url = xml.getAttribute('url');
1359 this.id = xml.id; 1359 this.id = xml.id;
1360 this.parent = parent; 1360 this.parent = parent;
1361 this.anchor = xml.getAttribute('anchor');
1362 if (this.anchor == 'true') {this.anchor = true;}
1363 else {this.anchor = false;}
1364
1365 this.reference = xml.getAttribute('reference');
1366 if (this.reference == 'true') {this.anchor = true;}
1367 else {this.reference = false;}
1368
1369 if (this.anchor == true && this.reference == true) {
1370 console.log('ERROR - Cannot have one audioElement be both the reference and anchor!')
1371 console.log(this);
1372 console.log('Neither will be enabled');
1373 this.anchor = false;
1374 this.reference = false;
1375 }
1361 }; 1376 };
1362 1377
1363 this.commentQuestionNode = function(xml) { 1378 this.commentQuestionNode = function(xml) {
1364 this.childOption = function(element) { 1379 this.childOption = function(element) {
1365 this.type = 'option'; 1380 this.type = 'option';