Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    Caius Caesar is on a distinguished road

      0  

    Default Ext 4.1: Nested droptargets

    Ext 4.1: Nested droptargets


    Problem with nested DropTarget

    Hi,
    I have panel A which contains two panels (B and C).

    All Panels (A, B and C) are configured to be droptargets for treenodes.

    I would expect that the drop event would occur on the innermost panel (in this case B or C) when I drop something on them, but the drop event occurs on the outer panel A only.

    Looking at the code of DragDropManager I gather that he iterates over all droptargets and returns the first one with matching coordinates. In my case this happens always to be the outermost container.

    I would expect that the inner panels get preference in receiving the drop event!

    Regards,
    Caius


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,047
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It's not my app but I don't think I would have drop targets within drop targets.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,913
    Vote Rating
    629
    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 might be something we'll look at addressing in Ext 5, the DD code is a bit clunky at the moment, so this is likely something to be improved then.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Sencha User kevin.chen's Avatar
    Join Date
    Sep 2012
    Location
    Redwood City, CA
    Posts
    242
    Vote Rating
    6
    kevin.chen is on a distinguished road

      0  

    Default


    You can create one DropZoneA to cover B an C, each B and C is a node inside DropZoneA, for A-B-C you need to implement following methods
    onContainerOver()
    onContainerDrop()

  5. #5
    Sencha User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    Caius Caesar is on a distinguished road

      0  

    Default


    Yeah well, It's a dashboard with individual items on it which can contain other items. Not really a way around it design wise. I was relying on Ext handling the dragdrop in a logical way.

  6. #6
    Sencha User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    Caius Caesar is on a distinguished road

      0  

    Default


    I'm on a tight deadline here. I assume Ext 5 isn't due for some time?

  7. #7
    Sencha User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    Caius Caesar is on a distinguished road

      0  

    Default


    Can I ask why this thread is closed?

  8. #8
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,913
    Vote Rating
    629
    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


    Yes, Ext5 won't be for some time.

    It's closed because we won't be pursuing this any further with Ext4, I've made a note to look at it as something for Ext5.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!