cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.21k stars 7.06k forks source link

cc.view.resizeWithBrowserSize didn't work! #18173

Open gclock56 opened 7 years ago

gclock56 commented 7 years ago

Steps to Reproduce:

  1. create a javascript sample project.
  2. simple run 'cocos run -p web' and check it.

resize_screenshot

udzhou commented 7 years ago

In your project path "frameworks/cocos2d-html5/cocos2d/core/platform/", edit file "CCEGLView.js" in 128 line , change "_orientationChanging: true" to "_orientationChanging: false", then it work.

gclock56 commented 7 years ago

@udzhou Thanks! Great solution. it works!!!