Pixi.js: autoPreventDefault não está funcionando. ainda não pode tocar rolagem.

Criado em 2 abr. 2018  ·  4Comentários  ·  Fonte: pixijs/pixi.js

Olá, em primeiro lugar, obrigado pela maravilhosa biblioteca.
Pixi é incrível, mal posso esperar pelo lançamento da v5!
Agora, encontrei um problema.
Não consigo rolar minha tela usando a rolagem móvel.
Estou usando a versão ^4.7.1

Aqui está o meu 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;

Comentários muito úteis

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

Todos 4 comentários

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

@rockmandash renderer.view.style.touchAction = 'auto'; fez o truque para mim!

isso está documentado em algum lugar?! parece que o pixi define essa regra css ( touch-action ), no próprio elemento canvas?

Este tópico foi bloqueado automaticamente, pois não houve nenhuma atividade recente depois que ele foi fechado. Por favor, abra um novo problema para bugs relacionados.

Esta página foi útil?
0 / 5 - 0 avaliações

Questões relacionadas

neciszhang picture neciszhang  ·  3Comentários

readygosports picture readygosports  ·  3Comentários

zcr1 picture zcr1  ·  3Comentários

Darker picture Darker  ·  3Comentários

finscn picture finscn  ·  3Comentários