changeset 2746:ae6d56a300c5

Errors in checkScaleRange
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 24 Apr 2017 15:49:07 +0100
parents 44a6a61de7fc
children 81a0a0fbfc69
files js/core.js
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Mon Apr 24 15:05:43 2017 +0100
+++ b/js/core.js	Mon Apr 24 15:49:07 2017 +0100
@@ -3256,7 +3256,7 @@
             };
         })();
         var range = audioEngineContext.audioObjects.reduce(function (a, b) {
-            var v = b.interfaceDOM.getValue();
+            var v = b.interfaceDOM.getValue() * 100.0;
             return {
                 min: Math.min(a.min, v),
                 max: Math.max(a.max, v)
@@ -3266,10 +3266,10 @@
             max: 0
         });
         if (range.min > scales.min) {
-            str += "At least one fragment must be below the " + range.min + " mark.";
+            str += "At least one fragment must be below the " + scales.min + " mark.";
             state = false;
         } else if (range.max < scales.max) {
-            str += "At least one fragment must be above the " + range.max + " mark.";
+            str += "At least one fragment must be above the " + scales.max + " mark.";
             state = false;
         }
         if (state === false) {
@@ -3505,7 +3505,7 @@
             var clone = this.parent.root.cloneNode(true);
             hold.appendChild(clone);
             var saveURL = specification.returnURL + "php/save.php?key=" + this.key + "&saveFilenamePrefix=";
-            if (this.parent.filenamePrefix.length == 0) {
+            if (this.parent.filenamePrefix.length === 0) {
                 saveURL += "save";
             } else {
                 saveURL += this.parent.filenamePrefix;