Corrected preventDefault with mousewheel in PixiJS List.
This commit is contained in:
+1
-1
@@ -107,11 +107,11 @@ export default class List extends PIXI.Container {
|
||||
if (this.opts.app) {
|
||||
const app = this.opts.app
|
||||
app.view.addEventListener('mousewheel', event => {
|
||||
event.preventDefault()
|
||||
const bounds = this.mask ? this.mask.getBounds() : this.getBounds()
|
||||
const x = event.clientX - app.view.getBoundingClientRect().left
|
||||
const y = event.clientY - app.view.getBoundingClientRect().top
|
||||
if (bounds.contains(x, y)) {
|
||||
event.preventDefault()
|
||||
this.emit('scroll', event)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user