mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge branch '3d' of https://github.com/cocos-creator/engine into 3d
This commit is contained in:
@@ -556,11 +556,8 @@ class View extends EventTarget {
|
||||
var canvas = cc.game.canvas;
|
||||
var container = cc.game.container;
|
||||
|
||||
//canvas.width = width * this._devicePixelRatio;
|
||||
//canvas.height = height * this._devicePixelRatio;
|
||||
|
||||
const w = width * this._devicePixelRatio;
|
||||
const h = height * this._devicePixelRatio;
|
||||
canvas.width = width * this._devicePixelRatio;
|
||||
canvas.height = height * this._devicePixelRatio;
|
||||
|
||||
canvas.style.width = width + 'px';
|
||||
canvas.style.height = height + 'px';
|
||||
|
||||
Reference in New Issue
Block a user