Skip to content
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

fix widget update when set content size #7275

Merged
merged 1 commit into from Sep 4, 2020

Conversation

knoxHuang
Copy link
Contributor

@knoxHuang knoxHuang commented Sep 2, 2020

Re: https://forum.cocos.org/t/2-4-2-wiget-alignmode-always/97706/7

这样改动的原因是因为如果是监听了系统的 resize 的话,通过 setContentSize 修改的时候并不会,它只会触发 canvas-resize 事件,同时看了一下 CCView 也有去监听 resize 事件,所以干脆直接最终监听 view 的 canvas-resize 事件

Changes:

  • 修复 widget 设置为 ON_WINDOW_RESIZE, 当使用 setContentSize 时, 并没有没有重新更新

@knoxHuang knoxHuang requested review from PPpro and wuzhiming Sep 2, 2020
PPpro
PPpro approved these changes Sep 2, 2020
@holycanvas holycanvas merged commit ac51f0a into cocos:v2.4.3-release Sep 4, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants