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

update alignWithScree in Canvas for fireball/issues/8281 #3186

Merged
merged 1 commit into from Sep 4, 2018

Conversation

knoxHuang
Copy link
Contributor

Re: cocos-creator/fireball#8281

Changelog:

  • 优化一下调用 alignWithScree 时机,让他不需要每帧去调用

@@ -116,6 +118,7 @@ var Canvas = cc.Class({
if (this._fitWidth !== value) {
this._fitWidth = value;
this.applySettings();
this.onResized();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

顺便在 onResized 里面加上 size dirty check 吧,通过保存之前的 size 并且对比新的 size 来判断是否需要调用 alignWithScreen

@pandamicro pandamicro merged commit efde172 into cocos:master Sep 4, 2018
knoxHuang added a commit to knoxHuang/engine-2 that referenced this pull request Dec 3, 2018
xianyinchen added a commit to xianyinchen/engine that referenced this pull request Dec 5, 2018
…into v2.1-release

* 'v2.1-release' of https://github.com/cocos-creator/engine: (133 commits)
  refine image type check (cocos#3591)
  modify preloadScene API params (cocos#3583)
  V2.0 skeleton optimize (cocos#3537)
  update alignWithScree in Canvas for fireball/issues/8281 (cocos#3186) (cocos#3585)
  add platform differ on baiduGame, vivoGame and oppoGame (cocos#3582)
  add stopAnimation/startAnimation to game pasue/resume (cocos#3584)
  Fix failed to update particle system _renderSpriteFrame (cocos#3577)
  fixed bar-filled (cocos#3581)
  refine buffer view check (cocos#3578)
  fixed texture image check in wechat game platform (cocos#3576)
  upgrade del to 3.0 (cocos#3572)
  Fix rendering residue for transparent images on Chrome69. (cocos#3357) (cocos#3573)
  add system font to richtext (cocos#3570)
  fix outline enable and disable invaild / rm label updateRenderData CC_EDITOR (cocos#3567)
  optimize children (cocos#3552)
  fixed bar-filled (cocos#3566)
  RichText support node color settings (cocos#3560)
  improve rotateTo/rotateBy (cocos#3565)
  improve rotateTo/rotateBy (cocos#3563)
  fix outline enable and disable is invaild bug (cocos#3564)
  ...
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

2 participants