你好,首先,感谢精彩的图书馆。
Pixi 太棒了,我等不及 v5 出来了!
现在,我遇到了一个问题。
我无法使用移动滚动条滚动画布。
我正在使用 ^4.7.1 版本
这是我的代码
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;
this.App.renderer.plugins.interaction.autoPreventDefault = false;
this.App.renderer.view.style.touchAction = 'auto';
@rockmandash renderer.view.style.touchAction = 'auto';
为我成功了!
这是在某个地方记录的吗? 看起来 pixi 在画布元素本身上设置了这个 css 规则( touch-action
)?
该线程已被自动锁定,因为它关闭后没有任何最近的活动。 请针对相关错误打开一个新问题。
最有用的评论