Merge pull request #91 from JsSucks/ui

Wheel number input
This commit is contained in:
Alexei Stukov 2018-02-05 00:44:59 +02:00 committed by GitHub
commit 17f9487225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -36,7 +36,14 @@
changeBy(positive) {
let step = this.setting.step == undefined ? 1 : this.settings.step;
this.change(this.setting.id, this.setting.value + (positive ? step : -step));
}
},
handleWheel() {} // No idea why this works but it does
},
beforeMount() {
window.addEventListener('wheel', this.handleWheel);
},
destroyed() {
window.removeEventListener('wheel', this.handleWheel);
}
}
</script>