This commit is contained in:
jerrywwl
2019-04-01 20:29:06 +08:00
+2 -5
View File
@@ -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';