1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    8
    Vote Rating
    0
    Chroder is on a distinguished road

      0  

    Default [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();

  2. #2
    Ext User rodiniz's Avatar
    Join Date
    Mar 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    276
    Vote Rating
    0
    rodiniz is on a distinguished road

      0  

    Default


    I think this is a bug also... I was almost putting it as a feature request..hope to see it fixed soon.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,064
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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.

  4. #4
    Ext User rodiniz's Avatar
    Join Date
    Mar 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    276
    Vote Rating
    0
    rodiniz is on a distinguished road

      0  

    Default


    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.

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,064
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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.

  6. #6
    Ext User rodiniz's Avatar
    Join Date
    Mar 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    276
    Vote Rating
    0
    rodiniz is on a distinguished road

      0  

    Default


    If i remove all children from a node, dragging then to another node,it becomes a leaf and doesn't accept children any more...

  7. #7
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,064
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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.

  8. #8
    Ext User
    Join Date
    Mar 2007
    Posts
    8
    Vote Rating
    0
    Chroder is on a distinguished road

      0  

    Default


    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.

  9. #9
    Ext User mjoksa's Avatar
    Join Date
    Jun 2007
    Posts
    73
    Vote Rating
    0
    mjoksa is on a distinguished road

      0  

    Default 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?

  10. #10
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Quote Originally Posted by mjoksa View Post
    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?
    Please do not tack onto bug posts with unrelated questsions (just b/c you have a question about the same topic doesn't mean it belongs in Bugs) - post questions in the Help forum in a new thread.