参考panel.js里的内容,添加以下三句用于改变leftpanel的大小
html.setStyle(this.domNode, "width","325px"); //设置leftpanel的宽度
topic.publish("changeMapPosition", { left: "325px" });//设置改变大小后map的位置topic.publish('resetAttributePanelPosition', { left: "325px" });//设置改变大小后attributetable的位置
上面只是刚开始用的,后来改了几次,最终是通过如下的方法
document.getElementById(this.domNode.id + "_panel").style.width = "325px";//发现leftpanel的id为this.domNode.id+"_panel"所以用这个来改变宽度
topic.publish("changeMapPosition", { left: "325px" });//改变map的位置
topic.publish('resetAttributePanelPosition', { left: "325px" });//改变左侧面板的位置