Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Ext JS Premium Member mtycholaz's Avatar
    Join Date
    Feb 2011
    Posts
    38
    Vote Rating
    4
    mtycholaz is on a distinguished road

      0  

    Default hbox layout alignment stretchmax not working correctly.

    hbox layout alignment stretchmax not working correctly.


    I'm having difficultly trying to resolve this problem with stretchmax alignment. Here's some code to reproduce. No height can be specified.

    Code:
    Ext.onReady(function(){
    
          Ext.create('Ext.container.Viewport', {
             title: 'Parent',
             items: [
                {
                   height: 300,
                   width: 800,
                   items: [
                      {
                         defaults: { flex: 1 },
                         layout: {
                            type: 'hbox',
                            align: 'stretchmax'
                         },
                         items: [
                            {
                               bodyPadding: 10, 
                               items: [
                                  {
                                     bodyStyle: 'border-color: white; background-color: white; border-radius: 10px;',
                                     bodyPadding: 10,
                                     items: [
                                        {
                                           html: 'asdfa sdf'
                                        }
                                     ]
                                  }
                               ]
                            },
                            {
                               bodyPadding: 10,
                               items: [
                                  {
                                     bodyStyle: 'border-color: white; background-color: white; border-radius: 10px;',
                                     bodyPadding: 10,
                                     items: [
                                        {
                                           html: 'This panel will have more content than the one to the left. However, eventually the content from this panel is not properly calculated, and the content begins to disappear out of sight :( The expected result should be both panels should stretch to be as large as this one. I do realize that this could be a result of the body padding, equalling twenty pixels, pushing the content down. Perhaps align "stretchmax" doesn\'t factor in bodypadding?'
                                        }
                                     ]
                                  }
                               ]
                            }                          
                         ]
                      }
                   ]
                }
             ],
             renderTo: Ext.getBody()
          });
       });

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,137
    Vote Rating
    321
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    It looks like a bug (moving this thread to bugs). Also text in my example is chopped:
    HTML Code:
    <!DOCTYPE html>
    <!-- hbox-stretchmax.html -->
    <html>
    <head>
        <title>Example by Saki</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="ext-4.0.6/resources/css/ext-all.css" type="text/css">
        <link rel="shortcut icon" type="image/png" href="../Icon.png">
        <script type="text/javascript" src="ext-4.0.6/ext-all-debug.js"></script>
        <script type="text/javascript">
    
        
        // entry point
        Ext.onReady(function() {
            var p = Ext.create('Ext.panel.Panel', {
                layout:{
                     type:'hbox'
                    ,align:'stretchmax'
                }
                ,width:500
    //            ,height:200
                ,defaults:{
                     flex:1
                }
                ,renderTo:Ext.getBody()
                ,title:'HBox Stretchamx'
                ,items:[{
                    html: 'This panel will have more content than the one to the left. However, eventually the content from this panel is not properly calculated, and the content begins to disappear out of sight :( The expected result should be both panels should stretch to be as large as this one. I do realize that this could be a result of the body padding, equalling twenty pixels, pushing the content down. Perhaps align "stretchmax" doesn\'t factor in bodypadding?'
                },{
                    html:'two'
                },{
                    html:'one'
                }]
            });
        }); // eo onReady
        
        </script>
    </head>
    <body>
    </body>
    </html>
    <!-- eof -->

  3. #3
    Ext JS Premium Member mtycholaz's Avatar
    Join Date
    Feb 2011
    Posts
    38
    Vote Rating
    4
    mtycholaz is on a distinguished road

      0  

    Default


    As a possible fix, could you force a call to doComponentLayout and have the hbox recalculate? Perhaps by adding a listener for afterrender? I've been attempting to do this, but I haven't had much success.

Thread Participants: 1

Tags for this Thread

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