Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2008
    Posts
    59
    Vote Rating
    0
    moldoe is on a distinguished road

      0  

    Default [FIXED] Bug in AbsoluteLayout?

    [FIXED] Bug in AbsoluteLayout?


    This used to work fine in 1.2.4.

    Since 2.0 repositioning a Component in a Container with AbosluteLayout doesn't work anymore in all the cases. Take a look at my test code. If I'd remove the intermediate LayoutContainer everything would work fine. But in my application I can not do it because I need different layout for my ContentPane.

    I'm using latest revision 1641 from the releases/2.0 branch.
    Windows XP
    IE7, FF3.0, Hosted Mode

    Code:
    public class Test implements EntryPoint {
    
    
        public void onModuleLoad() {
    
            Viewport viewport = new Viewport();
    
            final ContentPanel contentPanel = new ContentPanel();
            contentPanel.setLayout(new FitLayout());
    
            final LayoutContainer container = new LayoutContainer(new AbsoluteLayout());
            contentPanel.add(container);
    
    
            final Html html = new Html("<div style='border: 1px solid red;'>test</div>");
            container.add(html, new AbsoluteData(100, 100));
    
            contentPanel.addButton(new Button("Move", new SelectionListener<ButtonEvent>() {
                @Override
                public void componentSelected(ButtonEvent ce) {
                    container.setLayoutData(html, new AbsoluteData(200, 200));                
                    container.layout();
                }
            }));
    
    
            contentPanel.setFrame(true);
            contentPanel.setSize(400, 400);
            viewport.add(contentPanel);
            
            RootPanel.get().add(viewport);
    
        }
    }

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Yes, you are right. We added a cache to not call layout when it is not needed. However you just spotted a point were we have to let it through. As workaround you can call
    Code:
    container.layout(true);

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2008
    Posts
    59
    Vote Rating
    0
    moldoe is on a distinguished road

      0  

    Default


    Thanks for the quick reply!

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1