Mercurial > hg > webaudioevaluationtool
comparison js/specification.js @ 2252:aa36a634c8a6
Potential fix for #21
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 19 Apr 2016 16:17:28 +0100 |
parents | 0de305726129 |
children | fba85e745b0e |
comparison
equal
deleted
inserted
replaced
2251:6893f2930849 | 2252:aa36a634c8a6 |
---|---|
354 | 354 |
355 // Now the scales nodes | 355 // Now the scales nodes |
356 var scaleParent = xml.getElementsByTagName('scales'); | 356 var scaleParent = xml.getElementsByTagName('scales'); |
357 if (scaleParent.length == 1) { | 357 if (scaleParent.length == 1) { |
358 scaleParent = scaleParent[0]; | 358 scaleParent = scaleParent[0]; |
359 for (var i=0; i<scaleParent.children.length; i++) { | 359 var scalelabels = scaleParent.getAllElementsByTagName('scalelabel'); |
360 var child = scaleParent.children[i]; | 360 for (var i=0; i<scalelabels.length; i++) { |
361 this.scales.push({ | 361 this.scales.push({ |
362 text: child.textContent, | 362 text: scalelabels[i].textContent, |
363 position: Number(child.getAttribute('position')) | 363 position: Number(scalelabels[i].getAttribute('position')) |
364 }); | 364 }); |
365 } | 365 } |
366 } | 366 } |
367 }; | 367 }; |
368 | 368 |