extjs:响应面板容器及其组件的所有更改的事件
我有一个带有“autoscroll:true”配置的面板,它包含可折叠的字段集。我有一个图表,将根据该面板及其组件的变化重新绘制。
我想要做的是捕获所有这些“更改”事件,以便根据面板组件的位置正确设置图表。
我认为我需要捕获两种类型的事件:
1)面板滚动
这里如何在面板滚动结束时触发“afterscorll”事件?我用的是:Ext.getCmp("XX").body.on(afterScroll',function(){});但不起作用。
2)字段集展开/折叠
,我还想知道是否有一个统一的事件来捕获这些变化,无论是滚动还是从该面板中字段集的展开/折叠?那么我只需要调用它一次。
I have a panel with "autoscroll:true" configuration, and it contains collapsiable fieldsets. I have a graph which will be re-drawed based on changes in this panel and also from its components.
what i want to do is to caputre all these "change" events in order to properly set up the graph according to the positions of panel components.
i think there are two types of events i need to capture:
1) panel scroll
here how can I trigger the "afterscorll" event whle panel scroll ends? i used:Ext.getCmp("XX").body.on(afterScroll',function(){}); but doesnt work.
2) fieldset expand/collapse
and also I am wondering whether there is a unified event to capture these changes no matter from scrolling or from expand/collase of fieldsets in this panel? then i can only need to call it once.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道我的理解是否正确;您可以将事件冒泡给家长。我正在做很多情况,例如将字段中的事件更改为表单。
编辑:
这是一个简单的例子。刚刚输入并未经测试。但它会告诉你窍门。
I don't know if I got you right; You can bubble the events up to a parent. I am doing this many situations like with the change event on field to the form.
Edit:
Here is a simple exmaple. Just typed and untested. But it will show you the trick.