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");