当发生调整大小事件(无论是调整窗格大小、整个浏览器还是缩放)时,我想在一个窗格(即容器内容项)中执行一项操作。下面的工作,但是......如果我然后在窗格中拖动,甚至从左到右,到右左,或上下,它停止工作。
我假设重新排列窗格会重置某些东西,并且有一种正确的方法来获取持久事件处理程序。但我无法从文档中解决。
myLayout.on('initialised',initPanes);
function initPanes(){
myLayout.root.contentItems[0].contentItems[0].on('resize',function(){
console.log("First pane resized"); //TEMP
});
myLayout.root.contentItems[0].contentItems[1].on('resize',function(){
console.log("Second pane resized"); //TEMP
});
//...
}