comparison core.js @ 250:f69f7957979b

Bug Fix #1305: AudioHolders have 'presentedid' attribute in save
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Wed, 01 Jul 2015 10:21:52 +0100
parents 4f1016c535c8
children 96a6cea228b3
comparison
equal deleted inserted replaced
249:4f1016c535c8 250:f69f7957979b
392 if(this.stateIndex != null) { 392 if(this.stateIndex != null) {
393 console.log('NOTE - State already initialise'); 393 console.log('NOTE - State already initialise');
394 } 394 }
395 this.stateIndex = -1; 395 this.stateIndex = -1;
396 var that = this; 396 var that = this;
397 var aH_pId = 0;
397 for (var id=0; id<this.stateMap.length; id++){ 398 for (var id=0; id<this.stateMap.length; id++){
398 var name = this.stateMap[id].type; 399 var name = this.stateMap[id].type;
399 var obj = document.createElement(name); 400 var obj = document.createElement(name);
400 if (name == 'audioHolder') { 401 if (name == 'audioHolder') {
401 obj.id = this.stateMap[id].id; 402 obj.id = this.stateMap[id].id;
403 obj.setAttribute('presentedid',aH_pId);
404 aH_pId+=1;
402 } 405 }
403 this.stateResults.push(obj); 406 this.stateResults.push(obj);
404 } 407 }
405 } else { 408 } else {
406 conolse.log('FATAL - StateMap not correctly constructed. EMPTY_STATE_MAP'); 409 conolse.log('FATAL - StateMap not correctly constructed. EMPTY_STATE_MAP');