Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Final destination of a dragged and dropped canvas member

    When dragging and dropping a member within a canvas SmartGWT will automatically change the position in the list of members. I found that I can find which member is being repositioned by calling EventHandler.getDragTarget(). However, I haven't found out how to find out to what position the member was dropped to.

    #2
    During the drag and drop interaction, it would be layout.getDropPosition().

    Comment


      #3
      Thank you. I have tested this out and confirmed it for myself.

      Please confirm that correct what to get the component that is being dragged is:

      Code:
              addDropHandler(new DropHandler() {
      
                  @Override
                  public void onDrop(DropEvent dropEvent) {
                      Canvas dragTarget = EventHandler.getDragTarget();
                      handleDropEvent(dropEvent, dragTarget);
                  }
      
              });

      Comment


        #4
        Yes, getDragTarget() returns the component where the drag was initiated.

        Comment

        Working...
        X