-
Notifications
You must be signed in to change notification settings - Fork 478
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
[BUG]: 在使用自定义canvas时,canvas会自己自动变得很大,无法修改 #159
Labels
bug
Something isn't working
Comments
@FliPPeDround 已排查到问题所在,主要是没有手动规范canvas的css大小,在dpr不等于1的屏幕上会导致canvas会根据内容大小resize,从而循环触发resize越来越大。 目前来讲,请手动设置一个 css 来规范canvas style 的 width 和 height,不要使用默认值(即无style width height) |
已在 #163 中修复canvas无默认大小的情况,会跟随下个版本发布 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug描述
在使用自定义canvas时,canvas会自己自动变得很大,无法修改
Bug复现流程
const canvas = document.getElementById('canvas')
期待的结果
简介明要的阐述你期待发生什么结果
报错截图
如果可以,提供发生错误的截图
测试引擎版本:
本地运行出错的Orillusion引擎版本, e.g. 0.6.1
本机系统 (请填写完整):
代码示例
https://codepen.io/FliPPeDround/pen/mdzzBBJ
其他信息
添加关于bug的其他描述信息
The text was updated successfully, but these errors were encountered: