Przeglądaj źródła

value issue solved

vladislavaSim 1 rok temu
rodzic
commit
7f9aa32554
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      tuner/index.js

+ 2 - 2
tuner/index.js

@@ -54,9 +54,9 @@ function Control(el, {value=50,
     this.setValue(value)
 }
 let $song = document.querySelector('.mySong')
-const volumeControl  = new Control(container1, {value: 75, minAngle: -180})
+const volumeControl  = new Control(container1, {max: 1, wheelSpeed: 0.001, value: 75, minAngle: -180})
 volumeControl.onchange = (value => {
-    $song.volume = value / 100
+    $song.volume = value
 })
 
 setTimeout(() => volumeControl.setValue(80), 2000)