extjs4.0tree滚动条bug修复
程序员文章站
2022-05-24 09:34:00
...
// Override Ext.grid.Scroller object
// to workaround ExtJS bug EXTJSIV-3770
// more info at http://www.sencha.com/forum/showthread.php?142473-Bug-Tree-Grid-Scroller-Stops-Working
Ext.override(Ext.grid.Scroller, {
afterRender: function() {
var me = this;
me.callParent();
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
Ext.cache[me.el.id].skipGarbageCollection = true;
// add another scroll event listener to check, if main listeners is active
$(me.scrollEl.dom).scroll({scope: me}, me.onElScrollCheck);
},
// flag to check, if main listeners is active
wasScrolled: false,
// synchronize the scroller with the bound gridviews
onElScroll: function(event, target) {
this.wasScrolled = true; // change flag -> show that listener is alive
this.fireEvent('bodyscroll', event, target);
},
// executes just after main scroll event listener and check flag state
onElScrollCheck: function(event, target) {
var me = event.data.scope;
if (!me.wasScrolled)
// Achtung! Event listener was disappeared, so we'll add it again
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
me.wasScrolled = false; // change flag to initial value
}
});
Ext.override(Ext.grid.Scroller, {
afterRender: function() {
var me = this;
me.callParent();
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
Ext.cache[me.el.id].skipGarbageCollection = true;
// add another scroll event listener to check, if main listeners is active
Ext.EventManager.addListener(me.scrollEl, 'scroll', me.onElScrollCheck, me);
// ensure this listener doesn't get removed
Ext.cache[me.scrollEl.id].skipGarbageCollection = true;
},
// flag to check, if main listeners is active
wasScrolled: false,
// synchronize the scroller with the bound gridviews
onElScroll: function(event, target) {
this.wasScrolled = true; // change flag -> show that listener is alive
this.fireEvent('bodyscroll', event, target);
},
// executes just after main scroll event listener and check flag state
onElScrollCheck: function(event, target, options) {
var me = this;
if (!me.wasScrolled) {
// Achtung! Event listener was disappeared, so we'll add it again
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
}
me.wasScrolled = false; // change flag to initial value
}
});
// to workaround ExtJS bug EXTJSIV-3770
// more info at http://www.sencha.com/forum/showthread.php?142473-Bug-Tree-Grid-Scroller-Stops-Working
Ext.override(Ext.grid.Scroller, {
afterRender: function() {
var me = this;
me.callParent();
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
Ext.cache[me.el.id].skipGarbageCollection = true;
// add another scroll event listener to check, if main listeners is active
$(me.scrollEl.dom).scroll({scope: me}, me.onElScrollCheck);
},
// flag to check, if main listeners is active
wasScrolled: false,
// synchronize the scroller with the bound gridviews
onElScroll: function(event, target) {
this.wasScrolled = true; // change flag -> show that listener is alive
this.fireEvent('bodyscroll', event, target);
},
// executes just after main scroll event listener and check flag state
onElScrollCheck: function(event, target) {
var me = event.data.scope;
if (!me.wasScrolled)
// Achtung! Event listener was disappeared, so we'll add it again
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
me.wasScrolled = false; // change flag to initial value
}
});
Ext.override(Ext.grid.Scroller, {
afterRender: function() {
var me = this;
me.callParent();
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
Ext.cache[me.el.id].skipGarbageCollection = true;
// add another scroll event listener to check, if main listeners is active
Ext.EventManager.addListener(me.scrollEl, 'scroll', me.onElScrollCheck, me);
// ensure this listener doesn't get removed
Ext.cache[me.scrollEl.id].skipGarbageCollection = true;
},
// flag to check, if main listeners is active
wasScrolled: false,
// synchronize the scroller with the bound gridviews
onElScroll: function(event, target) {
this.wasScrolled = true; // change flag -> show that listener is alive
this.fireEvent('bodyscroll', event, target);
},
// executes just after main scroll event listener and check flag state
onElScrollCheck: function(event, target, options) {
var me = this;
if (!me.wasScrolled) {
// Achtung! Event listener was disappeared, so we'll add it again
me.mon(me.scrollEl, 'scroll', me.onElScroll, me);
}
me.wasScrolled = false; // change flag to initial value
}
});
上一篇: windchill过滤器配置
下一篇: servlet下载文件 Servlet
推荐阅读
-
Win11右键上下文菜单存在BUG 微软将着手进行修复
-
BAT批处理提取系统时间的实现代码(bug修复)
-
修复Bug大幅升级 Sun发布MySQL5.1版_MySQL
-
Win10 v1903版关机延长Bug已修复 微软:建议用户升级
-
微软发布KB4010250补丁 紧急修复Win10严重Bug
-
Win10 Build 10586.107正式推送 主要修复bug
-
Dedecms5.8中的CKEditor4.15 粘贴图片上传出错的Bug的修复
-
(下载)NVIDIA 375.63正式版驱动发布:紧急修复前一版BUG
-
Surface Pro 4/Book五月固件更新内容及修复bug汇总
-
NVIDIA GTX 1070美光显存BUG修复BIOS下载:华硕、技嘉等品牌上线