quilleashm
24 Jul 2007, 4:50 AM
Hi all,
Ext: 1.1 RC1
Adaptor: ExtBase
Browser: FF 2.0.0.4
OS: Win XP
I believe there is a bug in TreeNode.ensureVisible. The docs state that this should make sure all parent nodes are expanded, which it does, but it also expands the node itself, which I think is incorrect.
Current code
ensureVisible : function(callback){
var tree = this.getOwnerTree();
tree.expandPath(this.getPath(), false, function(){
tree.getTreeEl().scrollChildIntoView(this.ui.anchor);
Ext.callback(callback);
}.createDelegate(this));
},
Modified code, behaviour is as expected, changing so the path of the parent is passed to expandPath.
ensureVisible : function(callback){
var tree = this.getOwnerTree();
if (!this.parentNode)
return;
tree.expandPath(this.parentNode.getPath(), false, function(){
tree.getTreeEl().scrollChildIntoView(this.ui.anchor);
Ext.callback(callback);
}.createDelegate(this));
},
Any more details required please let me know.
Cheers.
Mike.
Ext: 1.1 RC1
Adaptor: ExtBase
Browser: FF 2.0.0.4
OS: Win XP
I believe there is a bug in TreeNode.ensureVisible. The docs state that this should make sure all parent nodes are expanded, which it does, but it also expands the node itself, which I think is incorrect.
Current code
ensureVisible : function(callback){
var tree = this.getOwnerTree();
tree.expandPath(this.getPath(), false, function(){
tree.getTreeEl().scrollChildIntoView(this.ui.anchor);
Ext.callback(callback);
}.createDelegate(this));
},
Modified code, behaviour is as expected, changing so the path of the parent is passed to expandPath.
ensureVisible : function(callback){
var tree = this.getOwnerTree();
if (!this.parentNode)
return;
tree.expandPath(this.parentNode.getPath(), false, function(){
tree.getTreeEl().scrollChildIntoView(this.ui.anchor);
Ext.callback(callback);
}.createDelegate(this));
},
Any more details required please let me know.
Cheers.
Mike.