davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.06k stars 177 forks source link

Zooming on trackpad touchpad on a laptop zooms the whole page and also changes the zoom ingame #178

Open gs11118 opened 4 years ago

gs11118 commented 4 years ago

Should not zoom the whole page, just the game zoom camera. Works fine on touch devices zoom

davidfig commented 4 years ago

have you tried viewport.options.stopPropagation or viewport.wheel()? If the whole page is zooming, then it's likely reaching browser's default action.

crutch12 commented 4 years ago

I found out - use passiveWheel: true (https://davidfig.github.io/pixi-viewport/jsdoc/global.html#ViewportOptions)