Pixi.js: autoPreventDefault funktioniert nicht. kann immer noch nicht scrollen berühren.

Erstellt am 2. Apr. 2018  ·  4Kommentare  ·  Quelle: pixijs/pixi.js

Hallo, zunächst einmal vielen Dank für die wunderbare Bibliothek.
Pixi ist fantastisch, ich kann es kaum erwarten, dass v5 herauskommt!
Nun bin ich auf ein Problem gestoßen.
Ich kann meine Leinwand nicht mit dem mobilen Scrollen scrollen.
Ich verwende die Version ^4.7.1

Hier ist mein 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;

Hilfreichster Kommentar

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

Alle 4 Kommentare

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

@rockmandash renderer.view.style.touchAction = 'auto'; hat es mir angetan!

ist das irgendwo dokumentiert?! Sieht so aus, als würde Pixi diese CSS-Regel ( touch-action ) auf dem Canvas-Element selbst festlegen?

Dieser Thread wurde automatisch gesperrt, da es nach seiner Schließung keine Aktivitäten mehr gegeben hat. Bitte öffnen Sie ein neues Problem für verwandte Fehler.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

YuryKuvetski picture YuryKuvetski  ·  3Kommentare

lucap86 picture lucap86  ·  3Kommentare

lunabunn picture lunabunn  ·  3Kommentare

neciszhang picture neciszhang  ·  3Kommentare

madroneropaulo picture madroneropaulo  ·  3Kommentare