easyui layout布局问题

$('#container').layout('panel','west').panel({
    onExpand:function(){
        onWindowResize();
    },
    onCollapse:function(){
        onWindowResize();
    }
   });
 
  
function onWindowResize(){
    if(timer!=null){
        clearTimeout(timer);
        timer=null;
    }
    timer=setTimeout(function(){
        $("#labcontainer").layout('resize');
        var width=parseFloat(container.offsetWidth);
        var height=parseFloat(container.offsetHeight);
        camera.aspect = width/height;
        camera.updateProjectionMatrix();
        renderer.setPixelRatio(window.devicePixelRatio);
        renderer.setSize(width,height);
        camera.updateMatrixWorld();
        renderer.render(scene, camera);
    },200);
}

你可能感兴趣的:(前端)