-
7 Nov 2007 2:48 PM #1
[2.0rc1/2.0.1] TreePanel: Dropping onto a Leaf Node
[2.0rc1/2.0.1] TreePanel: Dropping onto a Leaf Node
Whenever any node is set as a leaf, you can't append nodes to it via drag+drop.
I think this must be a mistake since there are config options 'allowChildren' and 'allowDrop' to control such behavior.
Changing this line of Ext.tree.TreeDropZone in getDropPoint() (removing the isLeaf check) fixes it:
Code:var noAppend = tn.allowChildren === false || tn.isLeaf();
-
8 Nov 2007 3:24 AM #2
I think this is a bug also... I was almost putting it as a feature request..hope to see it fixed soon.
-
8 Nov 2007 3:29 AM #3
I don't think this is a bug. By declaring something as a leaf you're saying it can't have any children. If you want it to have a children, don't declare it as a leaf.
-
8 Nov 2007 3:54 AM #4
But on a dynamic tree you can't transform any non leaf nodes into a leaf node.
And that's not god..If a node doesn't have any children when its loaded that shouldn't mean it can't have any children always.
-
8 Nov 2007 4:00 AM #5
Just because the node is at the lowest level of the tree, doesn't necessarily make it a leaf. A leaf node is only created if you specify it in the config for the node. If there's the possibility data might be added under it, then don't specify that property.
-
9 Nov 2007 2:31 AM #6
If i remove all children from a node, dragging then to another node,it becomes a leaf and doesn't accept children any more...
-
9 Nov 2007 4:43 AM #7
This isn't the case, unless I'm misunderstanding you:
http://extjs.com/deploy/ext-2.0-rc1/...e/reorder.html
Drag all items from adapter so that it is empty. Drag adapter inside data. Drop some element on adapter, it's still active and accepts the drop.
-
9 Nov 2007 6:36 PM #8
I thought 'leaf' was a current state thing. Ie. if there are currently children, then 'leaf' is true. No children, 'leaf' is false. If it were to control if children were allowed or not, then it makes the 'allowChildren' config option redundant.
-
28 Nov 2007 3:51 AM #9
My problem with leaf...
My problem with leaf...
I've also got problem with leaf node. I cannot find what event is raised when leaf node is loaded. Can anyone help me with this?
-
28 Nov 2007 8:12 AM #10
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide


Reply With Quote
