From b8c60e8069cd82fa2fe3f38d7e0975cb18e18331 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Tue, 21 Jul 2020 15:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E8=AE=BE?= =?UTF-8?q?=E5=A4=87nvidia=E6=89=A9=E5=B1=95=E5=B1=8F=E5=B9=95=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E4=BC=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3ddevice/jl3ddeviceNew.js | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index d4ec061c4..ee93176d0 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -161,10 +161,35 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { } window.onresize = function () { - console.log("ssss"); + + + // if(scope.windowstatus){ + // changeelement.style.width = '50%'; + // changeelement.style.height = '50%'; + // changeelement.style.top = '25%'; + // scope.windowstatus = false; + // scope.updatewindowstatus('0'); + // }else{ scope.camera.aspect = scope.dom.offsetWidth / scope.dom.offsetHeight; scope.camera.updateProjectionMatrix(); scope.renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight); + + console.log(scope.windowstatus); + if(scope.windowstatus == "0"){ + let changeelement = document.getElementById('jl3d'); + changeelement.style.width = '100%'; + changeelement.style.height = '100%'; + changeelement.style.top = '0'; + scope.camera.aspect = scope.dom.offsetWidth*2 / scope.dom.offsetHeight; + scope.camera.updateProjectionMatrix(); + scope.renderer.setSize(scope.dom.offsetWidth*2, scope.dom.offsetHeight); + } + + // } + + + + } this.domresize = function(){ console.log("domssss");