Pixi.js: autoPreventDefault ne fonctionne pas. ne peut toujours pas toucher le défilement.

Créé le 2 avr. 2018  ·  4Commentaires  ·  Source: pixijs/pixi.js

Bonjour, tout d'abord, merci pour la merveilleuse bibliothèque.
Pixi est incroyable, j'ai hâte que la v5 sorte !
Maintenant, j'ai rencontré un problème.
Je ne peux pas faire défiler ma toile à l'aide du défilement mobile.
J'utilise la version ^ 4.7.1

Voici mon code

    this.App = new Application(
      Math.min(window.innerWidth, window.screen.width),
      Math.min(window.innerHeight, window.screen.height),
      {
        backgroundColor: `0x${backgroundColor}`,
        resolution: window.devicePixelRatio
      }
    );

    this.App.renderer.plugins.interaction.autoPreventDefault = false; // notice that after adding this line still can't have scroll work.
    this.App.renderer.autoResize = true;

Commentaire le plus utile

    this.App.renderer.plugins.interaction.autoPreventDefault = false;
    this.App.renderer.view.style.touchAction = 'auto';

Tous les 4 commentaires

    this.App.renderer.plugins.interaction.autoPreventDefault = false;
    this.App.renderer.view.style.touchAction = 'auto';

@rockmandash renderer.view.style.touchAction = 'auto'; a fait l'affaire pour moi !

est-ce documenté quelque part ? ! on dirait que pixi définit cette règle CSS ( touch-action ), sur l'élément canvas lui-même ?

Ce fil a été automatiquement verrouillé puisqu'il n'y a eu aucune activité récente après sa fermeture. Veuillez ouvrir un nouveau problème pour les bogues associés.

Cette page vous a été utile?
0 / 5 - 0 notes

Questions connexes

readygosports picture readygosports  ·  3Commentaires

neciszhang picture neciszhang  ·  3Commentaires

st3v0 picture st3v0  ·  3Commentaires

SebastienFPRousseau picture SebastienFPRousseau  ·  3Commentaires

sntiagomoreno picture sntiagomoreno  ·  3Commentaires