Extjs 展开树节点时无法重用折叠动画
ExtJS 6.2是Opentext xCP的一部分,它有一个带有动画展开/折叠的树视图组件。有时,扩展失败:Extjs 展开树节点时无法重用折叠动画,extjs,Extjs,ExtJS 6.2是Opentext xCP的一部分,它有一个带有动画展开/折叠的树视图组件。有时,扩展失败: TypeError: Cannot read property 'scrollHeight' of null at constructor.onExpand (ext-all-debug.js:247739) 如果在塌陷仍处于动画状态时快速展开,则会发生这种情况 我检查并看到了以下代码: Ext.define('Ext.tree.View', { ... onExpand: func
TypeError: Cannot read property 'scrollHeight' of null
at constructor.onExpand (ext-all-debug.js:247739)
如果在塌陷仍处于动画状态时快速展开,则会发生这种情况
我检查并看到了以下代码:
Ext.define('Ext.tree.View', {
...
onExpand: function(parent) {
...
animWrap = me.getAnimWrap(parent, false);
...
animateEl = animWrap.animateEl;
targetEl = animWrap.targetEl;
animateEl.stopAnimation();
...
animateEl.animate({
...
to: {
height: targetEl.dom.scrollHeight // Cannot read property 'scrollHeight' of null
},
这是很自然的,因为stopAnimation()
刚刚在afteranimate
处理程序中销毁了先前由onCollapse()添加的animateEl
我检查了7.3,没有发现明显的修复方法。请帮助我理解它是如何工作的。此外,我也有麻烦,使动画中