-
Notifications
You must be signed in to change notification settings - Fork 2k
fix bug about orientation & safeArea ( CCView.js ) #16714
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
Conversation
旋转时应强制执行 resizeEvent. 快速旋转180度时, frame/ view没有发生变化, 但是 刘海 挖空位置反转 需要更新 safeArea.
已经在处理 orientation 的问题了。orientation 和 resize 会分开处理。 |
@@ -209,7 +209,7 @@ cc.js.mixin(View.prototype, { | |||
|
|||
_orientationChange: function () { | |||
cc.view._orientationChanging = true; | |||
cc.view._resizeEvent(); | |||
cc.view._resizeEvent(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can cherry repick code from #16774
and follow this PR-test-case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can cherry repick code from #16774 and follow this PR-test-case
@finscn 不好意思,一直以为是3.x的代码,2.x不能直接用。3.x的类似逻辑未同步到2.x前,可以按照你的方式修改。
我没太明白啥意思. 我这个PR 要解决的核心问题 不是 "我监听不到 orientation-change事件". |
Should force trigger resize event when the orientation changed.
fix bug about orientation & safeArea ( CCView.js ) (#16714)
旋转时应强制执行 resizeEvent.
快速旋转180度时, frame/ view没有发生变化, 但是 刘海 挖孔位置反转, 需要刷新 safeArea 和 widget组件
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: