fix volume mousewheel bounds

This commit is contained in:
vapormusic 2022-01-05 16:37:36 +07:00
parent 4ccc389fa3
commit 8ecd174a11
2 changed files with 7 additions and 3 deletions

View file

@ -2590,11 +2590,15 @@ const app = new Vue({
volumeWheel(event) {
if (event.deltaY < 0) {
if(this.mk.volume < 1){
this.mk.volume += 0.1
if (this.mk.volume <= 0.9) {
this.mk.volume += 0.1
} else { this.mk.volume = 1 }
}
} else if (event.deltaY > 0) {
if(this.mk.volume > 0){
this.mk.volume -= 0.1
if (this.mk.volume >= 0.1){
this.mk.volume -= 0.1
} else {this.mk.volume = 0}
}
}
},