Results 1 to 9 of 9

Thread: BasicDialog proxy drag

  1. #1
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default BasicDialog proxy drag

    Jack,

    With 0.33 RC1, proxy drag isn't working. It could be because the proxy is now in Display mode rather than Visibility mode. I'm not sure why you did that.

    Thanks.

    -Jarred

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Confirmed. Remove the call "this.proxy.enableDisplayMode('block');" and everything is just fine.

  3. #3
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    Display mode is required to keep it from causing scrollbars when it is hidden.

    I changed these two functions, does this work for you?

    Code:
    startMove : function(){
            if(this.proxyDrag){
                this.proxy.show();
            }
            if(this.constraintoviewport != false){
                this.dd.resetConstraints();
                this.viewSize = [YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];
                this.dd.setXConstraint(this.xy[0], this.viewSize[0]-this.xy[0]-this.el.getWidth()-this.shadowOffset);
                this.dd.setYConstraint(this.xy[1], this.viewSize[1]-this.xy[1]-this.el.getHeight()-this.shadowOffset);
            }
        },
        
        endMove : function(){
            YAHOO.util.DDProxy.prototype.endDrag.apply(this.dd, arguments);
            this.refreshSize();
            this.adjustShadow();
            if(this.proxyDrag){
                this.proxy.hide();
            }
            this.fireEvent('move', this, this.xy[0], this.xy[1])
        }

  4. #4
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Yeah that's just as good, thank you.

    I didn't know about that bug. I've used it in IE6 and FF 1.5 and haven't experienced scroll bars popping up at all, but I understand.

    You're getting another donation :-)

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    Thanks.

    The scrollbars only appear if the body element scrolls - if you are using BorderLayout (which I think you are) and kill body scroll then you would never get them.

  6. #6
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Not sure, but it's broken still. This time, it's not the dragging itself, but after a drag, when you hide the dialog and it has an animateTarget, the proxy doesn't animate back to the target, it just disappears. Then a reopen of the dialog and the proxy isn't animating, it's basically "gone". I thought it was because the proxy was being show after a setBounds was being called, but that doesn't seem to matter if you don't drag the dialog at all before hiding the dialog. Weird.

    Thanks.

    -Jarred

    P.S. I think it might have to do with the way the YUI DDProxy handles the beginning and end of a drag using a proxy element. It might not like the idea that the element is in display mode or something when the drag ends. I'm not really in the mood to dig through Yahoo! code :-( hehe

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    You were along the right lines. DDProxy sets visibility hidden on the proxy and we are using display. I just undid their setting.

    Code:
    endMove : function(){
            if(!this.proxyDrag){
                YAHOO.util.DD.prototype.endDrag.apply(this.dd, arguments);
            }else{
                YAHOO.util.DDProxy.prototype.endDrag.apply(this.dd, arguments);
                this.proxy.setStyle('visibility', 'visible');
                this.proxy.hide();
            }
            this.refreshSize();
            this.adjustShadow();
            this.fireEvent('move', this, this.xy[0], this.xy[1])
        }

  8. #8
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Thanks so much for looking into this. I feel like I'm being a pain in the ass :-)

    -Jarred

  9. #9
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    People who have donated are never a pain in the ass.

Similar Threads

  1. Definition of Store, Reader and Proxy
    By kalebwalton in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 21 Mar 2007, 12:22 AM
  2. Dialog Drag Bug
    By Bobafart in forum Ext 1.x: Bugs
    Replies: 5
    Last Post: 19 Mar 2007, 6:04 AM
  3. Possible Bug: Web Proxy alerted...
    By patspats in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 23 Feb 2007, 2:27 PM
  4. BasicDialog and a grid with drag and drop. Help needed...
    By gizzmo in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 12 Jan 2007, 11:49 AM
  5. GridDD and Drag Drop on BasicDialog / LayoutDialog
    By christocracy in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 17 Dec 2006, 10:18 PM

Posting Permissions

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