Pixi.js: autoPreventDefault no funciona. Todavía no puedo tocar el scroll.

Creado en 2 abr. 2018  ·  4Comentarios  ·  Fuente: pixijs/pixi.js

Hola, en primer lugar, gracias por la maravillosa biblioteca.
Pixi es increíble, ¡no puedo esperar a que salga v5!
Ahora, me he encontrado con un problema.
No puedo desplazar mi lienzo usando el desplazamiento móvil.
Estoy usando la versión ^4.7.1

Aquí está mi código

    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;

Comentario más útil

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

Todos 4 comentarios

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

¡@rockmandash renderer.view.style.touchAction = 'auto'; hizo el truco para mí!

¿Esto está documentado en algún lugar? parece que pixi establece esta regla css ( touch-action ), en el propio elemento del lienzo?

Este hilo se ha bloqueado automáticamente ya que no ha habido ninguna actividad reciente después de que se cerró. Abra un nuevo problema para los errores relacionados.

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

st3v0 picture st3v0  ·  3Comentarios

madroneropaulo picture madroneropaulo  ·  3Comentarios

neciszhang picture neciszhang  ·  3Comentarios

Makio64 picture Makio64  ·  3Comentarios

SebastienFPRousseau picture SebastienFPRousseau  ·  3Comentarios