fix: wheel events

This commit is contained in:
cha0s 2021-02-10 13:12:38 -06:00
parent 34a54cdc59
commit d61c0c2a82

View File

@ -10,6 +10,7 @@ export default class ActionRegistry extends decorate(Class) {
axis: {},
key: {},
button: {},
wheel: {},
};
#stream = [];
@ -75,17 +76,11 @@ export default class ActionRegistry extends decorate(Class) {
}
onWheelDown(delta) {
this.#stream.push({
action: 'WheelDown',
value: this.transform('WheelDown', delta, 'wheel'),
});
this.onInput('wheel', 'down', delta, 'wheelDown');
}
onWheelUp(delta) {
this.#stream.push({
action: 'WheelUp',
value: this.transform('WheelUp', delta, 'wheel'),
});
this.onInput('wheel', 'up', delta, 'wheelUp');
}
setTransformerFor(action, transformer) {