-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
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
bitmap实例的img属性不可读 #23
Comments
不知道小程序里给临时文件干了什么事情。。试试真机打印出什么 |
@dntzhang 不只是临时文件,有些实际存在的也不行,是不是render的时候,还有image在走wx的getimginfo的异步?大部分都可以,偶然有几个 |
@dntzhang 估计是这样,是不是render的时候,还有异步在执行,我把整个stage的update延时100ms就可以解决问题了 setTimeout(function () {
stage.update()
}, 100) |
微信开发者工具确实临时文件也是http开头会走downloadfile在gerimageinfo。这个等我兼容下开发工具。真机应该没问题 |
@dntzhang 不不大佬,http头是我提的另一个issue,这个issue是因为,getimageinfo是异步,如果页面是一个静态的canvas,第一个stage在update的时候,如果所有图片没有全部getimageinfo获取完数据,就会造成图片不渲染的问题。你可以试试,一个页面用很多个bitmap |
所有 new Bitmap('xx',()=>{stage.update()}) 提供了第二个参数执行图片ready的回调啊 |
遇到一个奇怪的问题,偶尔有几个bitmap实例上面属性不可读,但是console出来都能看到
undefined
是我console的,bitmap上面的img属性The text was updated successfully, but these errors were encountered: