changeset 2951:7d1a34b5a4d2

Fix for #250
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 31 Oct 2017 09:54:55 +0000
parents 3dc059f3b57c
children 096b7a56ba27 aa1ceca04519
files js/core.js
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Mon Oct 30 15:34:44 2017 +0000
+++ b/js/core.js	Tue Oct 31 09:54:55 2017 +0000
@@ -3025,12 +3025,13 @@
         volume.slider.value = 0;
         volume.slider.step = 1;
         volume.handleEvent = function (event) {
-            if (event.type == "mousemove") {
+            if (event.type == "mousemove" || event.type == "mouseup") {
                 this.valueDB = Number(this.slider.value);
                 this.valueLin = decibelToLinear(this.valueDB);
                 this.valueText.textContent = this.valueDB + 'dB';
                 audioEngineContext.outputGain.gain.value = this.valueLin;
-            } else if (event.type == "mouseup") {
+            }
+            if (event.type == "mouseup") {
                 this.onmouseup();
             }
             this.slider.value = this.valueDB;