Results 1 to 2 of 2

Thread: Draggable Panels - Want All Of Panel To Be Draggable

  1. #1

    Default Draggable Panels - Want All Of Panel To Be Draggable

    Long story short, I have floating panels that I need to be draggable.

    PHP Code:
    var newPanel = new Ext.Panel({
                
    idconfig.id,
                
    floatingtrue,
                
    widthconfig.width,
                
    cellconfig.cell,
                
    resfalse,
                
    frametrue,
                
    shadowfalse,
                
    heightconfig.height,
                
    borderfalse,
                
    style: { padding'0px'cursor'move' },
                
    bodyBorderfalse,
                
    title'Event: ' config.id,
                
    draggable: {
                        
    insertProxyfalse,
                        
    onDrag : function(e){
                            var 
    pel this.proxy.getEl();
                            
    this.pel.getLeft(true);
                            
    this.pel.getTop(true);
                            
    this.xTicks tN.appPanel.dragxTicks;
                            
    this.yTicks tN.appPanel.dragyTicks;
                            var 
    this.panel.getEl().shadow;
                            if (
    s) {
                                
    s.realign(this.xthis.ypel.getWidth(), pel.getHeight());
                            }
                            var 
    res tN.functions.calCoords({ xthis.xythis.y});
                            if (
    res) {
                                if (!
    this.res) { this.res resthis.res.time 0; }
                                if (
    this.res.time != res.time || this.res.column != res.column) {
                                    
    this.res res;
                                }
                            }
                        },
                
                
    //      Called on the mouseup event.
                        
    endDrag : function(e){
                            
    //dostuff
                        
    }
                }
            }); 
    The draggable config (which I admittedly grabbed from the API Docs) works great! No proxy/ghost whatchamacallit which is exactly how I want it to drag.

    My only problem is that the panel is only draggable from the titlebar, I want the whole panel / element to be draggable.

    I'm sure it's easy enough to do I'm just not sure how to do it with this draggable config. And whenever I've used DragSource / DDProxy etc I definitely don't get what I want. I really do not want a drag proxy/ghost.

    Sorry if I'm not making much sense.

  2. #2

    Default

    Well I solved it all on my own. Simply by adding

    Code:
    newPanel.dd.setHandleElId(newPanel.id);
    In the render event for the panel. Easy as pie.

Posting Permissions

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