We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
调试后发现是下面这个函数的问题,dpi=2造成后面assets.find找不到资源
建议做一个兼容修改,优先找x2的图片,如果找不到就找 x1的图片
另外我试验了一下,如果强制 let dpi = '/x1/',图片可以显示,但还是保持图片的原始大小
AssetsManager.getImage = function (name) { let anydpi = '/xx/'; let dpi = '/x‘ + TBrowser.getDevicePixelRatio() + ’/'; const assets = g_awtk_assets['image']; if (assets) { const asset = assets.find(iter => { return name == iter.name && (iter.uri.indexOf(anydpi) >= 0 || iter.uri.indexOf(dpi) >= 0);; }); return asset; } return null; }
The text was updated successfully, but these errors were encountered:
已修改。谢谢
Sorry, something went wrong.
No branches or pull requests
调试后发现是下面这个函数的问题,dpi=2造成后面assets.find找不到资源
建议做一个兼容修改,优先找x2的图片,如果找不到就找 x1的图片
另外我试验了一下,如果强制 let dpi = '/x1/',图片可以显示,但还是保持图片的原始大小
The text was updated successfully, but these errors were encountered: