Ext 监听页面窗口大小
程序员文章站
2022-03-04 17:47:21
...
ext 监听页面大小 实时获取页面的宽高
chartid为echarts图形,同步监听
/**
* 监听统计图大小
*/
Ext.on('resize', function (width, height){
var chartDiv = document.getElementById('chartid');
var wvalue = width;
chartDiv.style.width = wvalue;
chartDiv.firstChild.style.width = wvalue;
var hvalue = height-290;
chartDiv.style.height = hvalue;
chartDiv.firstChild.style.height = hvalue;
if(null != managerDashboard.myChart && !Ext.isEmpty(managerDashboard.myChart))
managerDashboard.myChart.resize();
});
上一篇: 推荐一首歌 - Just Another (Pete Yorn)
下一篇: js判断页面日期大小