davidfig / pixi-viewport

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

Question: How to configure viewport to ignore one finger scroll? #445

Closed redexp closed 1 year ago

redexp commented 1 year ago

I want the user to be able to scroll over the page with one finger even over pixi canvas. .pinch() plugin makes it possible to drag and zoom with two fingers so any one finger dragging should be ignored and not "default prevented". Is it possible to do so?

redexp commented 1 year ago

I'm sorry, it's not viewport issue, it's pixi autoPreventDefault option. Fixed with this code

app.renderer.events.autoPreventDefault = false;
app.renderer.view.style.touchAction = 'pan-y';