Results 1 to 1 of 1

Thread: Dragging Panels - Offset between drag container and actual object

  1. #1
    Ext User
    Join Date
    Nov 2007
    Location
    Hyderabad, India
    Posts
    51

    Question Dragging Panels - Offset between drag container and actual object

    This is a continuation of my previous post about Dragging elements into Grid cells: http://extjs.com/forum/showthread.php?t=19056

    I use a simple Panel configured to be a DragSource

    PHP Code:
    ...
                var 
    myNewPanel = new Ext.Panel({
                    
    height'300',
                    
    width'100',
                    
    name'myPanel',
                    
    id'myPanel',
                    
    frametrue,
                    
    layout'absolute',
                    
    shadowfalse,
                    
    floatingtrue,
                    
    title'hello'
                
    });
    ...
                var 
    myDDPanel Ext.get('myPanel');
                
    myDDPanel.dd = new Ext.dd.DragSource(myDDPanel, {
                    
    ddGroup'myDragPanels',
                    
    isTargettrue
                    
    centerFramefalse 
                
    });
                
    myNewPanel.setPosition(100100);
    ... 
    The result when I drag the panel looks like the attachment. There is an offset between the drag container and the dragged element equal to the co-ordinate ticks that I put into the setPosition method... Is there another method in the DragSource class that I need to call?

    Removing the setPosition method call does not show the panel element in my UI though. Is there another way of making the panel show up after adding it to the GridPanel?
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •