1. #1
    Ext User lvanderree's Avatar
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    181
    Vote Rating
    0
    lvanderree is on a distinguished road

      0  

    Default [2.0a1] Border layout brakes when a panel is removed+missing function: setCollapsible

    [2.0a1] Border layout brakes when a panel is removed+missing function: setCollapsible


    You can define collapsible in your panel configuration, during construction, but there is no way to change this after instantiation of the object.

    I don't know if anyone really want to have such a function, but at the moment I have a problem that the mini-collapse button does not disappear, when I hide the west-panel of my border layout, after I first let it collapse.

    Code:
        hideLeftManagerPanel: function() {
          leftManagerPanel.collapse();
          leftManagerPanel.hide();
        },
    Besides the borderlayout does not resize the remaining panels, when one of the panels is removed (without collapsing it).

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    BorderLayout Panels cannot be removed. You can hide them, and you can also use a "middle man" Panel with the baseCls x-plain to just use it as a container for other panels that can be added and removed.

    You other problem stems from the fact that collapse is by default animated and asynchronous.

    leftManagerPanel.collapse(); <-- async
    leftManagerPanel.hide(); <-- will fail because panel is in the process of collapsing

    You will need to use the callback argument and/or turn off the animation.

    You cannot change collapsible at runtime. You could however just hide the collapse button (panel.tools.toggle.hide()).

    --

    Please post to help by default and once it is verified there is a bug then post to bugs.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Ext User lvanderree's Avatar
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    181
    Vote Rating
    0
    lvanderree is on a distinguished road

      0  

    Default


    Ah that makes sense, I already thought about this myself last night.

    Disabling the animation fixes the problem of the mini-collapse-button which still was showing.

    Code:
          leftManagerPanel.collapse(false);
          leftManagerPanel.hide();
    However when I leaf out collapse completely, the border layout does not update the size of the center panel, so you get a big hole at the location of where the leftManagerPanel was. I expect that if I hide one of the panels from the border layout the other panels automatically fill the free space. This only happens after I resize my browser window...



    With collapse on, this empty area is a lot smaller and I didn't noticed it, but it also is there, until I resize my browser window. (I can probably manually let the layout redraw to fix this issue, but I don't think this is desired.)


    Btw I was using the collapse to animate the disappearing panel.
    Last edited by lvanderree; 3 Oct 2007 at 3:27 AM. Reason: make more clear

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Did you try triggering a layout recalc after the hide? e.g. yourViewport.doLayout()
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  5. #5
    Ext User lvanderree's Avatar
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    181
    Vote Rating
    0
    lvanderree is on a distinguished road

      0  

    Default


    I did not, but now I do, this fixes the issue.

    Maybe it is nice to have this hint to use doLayout() in the docs at the hide method. Because I did use doLayout at the end of the construction of my page, because I copied it from an example, and completely forgot about it when calling the hide function in a special function.

    It also is not very clear, because show() does not require this manual trigger.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar