I am having troubles with making canvas area stay with fixed size.
My canvas in html file looks like this:
<canvas id="gameCanvas" width="720" height="480"> </canvas>
And in main.js i am doing
cc.EGLView.getInstance().setDesignResolutionSize(720, 480, cc.RESOLUTION_POLICY.SHOW_ALL);
The problem is that canvas takes up entire web browser page area on page load, even if browser window is much larger than 720x480
Basically i need to make canvas behave exactly like on this page: http://cocos2d-x.org/npm/cocos2d-html5/index.html