diff --git a/packages/graphics/stage.js b/packages/graphics/stage.js index 172f951..6ee950e 100644 --- a/packages/graphics/stage.js +++ b/packages/graphics/stage.js @@ -49,6 +49,7 @@ export class Stage extends decorate(Container) { this.inputNormalizer.on('pointerDown', this.onPointerDown, this); this.inputNormalizer.on('pointerMove', this.onPointerMove, this); this.inputNormalizer.on('pointerUp', this.onPointerUp, this); + this.inputNormalizer.on('wheel', this.onWheel, this); // Put the renderer and UI in the container element, and mark it // focusable. this.element.appendChild(this.renderer.element); @@ -93,6 +94,7 @@ export class Stage extends decorate(Container) { this.inputNormalizer.off('pointerDown', this.onPointerDown); this.inputNormalizer.off('pointerMove', this.onPointerMove); this.inputNormalizer.off('pointerUp', this.onPointerUp); + this.inputNormalizer.off('wheel', this.onWheel); this.inputNormalizer.destroy(); } @@ -155,6 +157,10 @@ export class Stage extends decorate(Container) { this.emit('pointerUp', event); } + onWheel(event) { + this.emit('wheel', event); + } + onWindowResize() { if (!this.parent) { return;