# HG changeset patch # User Nicholas Jillings # Date 1459258627 -3600 # Node ID dd5a8556235c8ba8e5d8635e048c2409f0b9a543 # Parent 96988cb46d1862e0adb61a4f58527ccb6ed10c97 Calibration sliders update on mouse move trigger diff -r 96988cb46d18 -r dd5a8556235c core.css --- a/core.css Tue Mar 29 14:24:05 2016 +0100 +++ b/core.css Tue Mar 29 14:37:07 2016 +0100 @@ -201,5 +201,5 @@ -webkit-appearance: slider-vertical; /* WebKit */ width: 8px; padding: 0 5px; - color: rgb(255, 144, 144); + height: 290px; } \ No newline at end of file diff -r 96988cb46d18 -r dd5a8556235c core.js --- a/core.js Tue Mar 29 14:24:05 2016 +0100 +++ b/core.js Tue Mar 29 14:37:07 2016 +0100 @@ -3107,13 +3107,6 @@ f: f0, parent: this, handleEvent: function(event) { - var value = Math.pow(10,this.input.value/20); - if (this.f == 1000) { - audioEngineContext.outputGain.gain.value = value; - interfaceContext.volume.slider.value = this.input.value; - } else { - this.gain.gain.value = value - } switch(event.type) { case "mouseenter": this.oscillator.start(0); @@ -3124,6 +3117,15 @@ this.oscillator.connect(this.gain); this.oscillator.frequency.value = this.f; break; + case "mousemove": + var value = Math.pow(10,this.input.value/20); + if (this.f == 1000) { + audioEngineContext.outputGain.gain.value = value; + interfaceContext.volume.slider.value = this.input.value; + } else { + this.gain.gain.value = value + } + break; } }, disconnect: function() { @@ -3147,7 +3149,7 @@ obj.input.value = 0; obj.root.style.backgroundColor="rgb(255,125,125)"; } - obj.input.addEventListener("change",obj); + obj.input.addEventListener("mousemove",obj); obj.input.addEventListener("mouseenter",obj); obj.input.addEventListener("mouseleave",obj); obj.gain.gain.value = Math.pow(10,obj.input.value/20);