deepsea 1 年之前
父节点
当前提交
fd53f12e52
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      src/store/modules/common/mutations.js

+ 2 - 6
src/store/modules/common/mutations.js

@@ -112,14 +112,10 @@ export default {
         let width = parseFloat(style.width);
         let height = parseFloat(style.height);
 
-        let ratio = devicePixelRatio - (devicePixelRatio / 10);
+        let ratio = 1.8;
         window.renderWidth = width * ratio;
         window.renderHeight = height * ratio;
-        window.sdkInstance.sceneRenderer.updateScreenSize(width, height);
-        element.width = (width * 2) * ratio;
-        element.height = (height * 2) * ratio;
-        element.style.width = (width * ratio)+'px';
-        element.style.height = (height * ratio)+'px';
+        window.sdkInstance.sceneRenderer.updateScreenSize(width * ratio, height * ratio);
         element.style.marginLeft = ((width - (width * ratio)) / 2) + 'px';
         element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
         let playersmall = document.getElementById('playersmall')