changeset 2694:1ccc083552d5

Minor fixed for AB
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 11 Mar 2017 18:14:59 +0000
parents 31af72ea5e61
children 211364181d16
files interfaces/AB.js js/core.js
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/interfaces/AB.js	Sat Mar 11 11:43:57 2017 +0000
+++ b/interfaces/AB.js	Sat Mar 11 18:14:59 2017 +0000
@@ -275,9 +275,9 @@
         };
         this.playback.setAttribute("playstate", "ready");
         this.playbackClicked = function () {
-            if (event.currentTarget.getAttribute("playstate") == "ready") {
+            if (this.playback.getAttribute("playstate") == "ready") {
                 audioEngineContext.play(this.id);
-            } else if (event.currentTarget.getAttribute("playstate") == "playing") {
+            } else if (this.playback.getAttribute("playstate") == "playing") {
                 audioEngineContext.stop();
             }
 
--- a/js/core.js	Sat Mar 11 11:43:57 2017 +0000
+++ b/js/core.js	Sat Mar 11 18:14:59 2017 +0000
@@ -3629,10 +3629,10 @@
         this.XMLDOM.setAttribute('ref', specification.id);
         this.XMLDOM.setAttribute('presentedId', specification.presentedId);
         this.XMLDOM.setAttribute("state", this.state);
-        if (specification.preTest !== null) {
+        if (specification.preTest !== undefined) {
             this.preTest = new this.parent.surveyNode(this.parent, this.XMLDOM, this.specification.preTest);
         }
-        if (specification.postTest !== null) {
+        if (specification.postTest !== undefined) {
             this.postTest = new this.parent.surveyNode(this.parent, this.XMLDOM, this.specification.postTest);
         }