소스 검색

value issue solved

vladislavaSim 2 년 전
부모
커밋
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)