浏览代码

value issue solved

vladislavaSim 1 年之前
父节点
当前提交
7f9aa32554
共有 1 个文件被更改,包括 2 次插入2 次删除
  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)