fix volume mousewheel bounds
This commit is contained in:
parent
4ccc389fa3
commit
8ecd174a11
2 changed files with 7 additions and 3 deletions
|
@ -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}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue