diff js/specification.js @ 2777:72604c3a3ed9

Added schema layouts for #138
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Fri, 21 Apr 2017 14:46:16 +0100
parents 2fc62a50d593
children 9c031a976321
line wrap: on
line diff
--- a/js/specification.js	Fri Apr 21 14:28:26 2017 +0100
+++ b/js/specification.js	Fri Apr 21 14:46:16 2017 +0100
@@ -415,6 +415,7 @@
     this.interfaceNode = function (specification) {
         this.title = undefined;
         this.name = undefined;
+        this.image = undefined;
         this.options = [];
         this.scales = [];
         this.schema = schemaRoot.getAllElementsByName('interface')[1];
@@ -443,7 +444,11 @@
                 }
                 this.options.push(option);
             }
-
+            // Get the image node
+            var imageNode = xml.getElementsByTagName("image");
+            if (imageNode.length == 1) {
+                this.image = imageNode[0].getAttribute("src");
+            }
             // Now the scales nodes
             var scaleParent = xml.getElementsByTagName('scales');
             if (scaleParent.length == 1) {
@@ -790,6 +795,7 @@
             this.startTime = undefined;
             this.stopTime = undefined;
             this.sampleRate = undefined;
+            this.image = undefined;
             this.alternatives = [];
             this.schema = schemaRoot.getAllElementsByName('audioelement')[0];
             this.parent = undefined;