1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    82
    Answers
    7
    Vote Rating
    1
    dr-dan is on a distinguished road

      0  

    Default Answered: Hbox layout not resizing on browser resize

    Answered: Hbox layout not resizing on browser resize


    I have a content panel centered, with two panels either side acting as padding each with unique background repeat (this is why i havent used a trad. margin: auto}:

    Flexer.png

    The panels render fine, but they do not "flex" as expected when i resize the browser window. They stay as they are. The parent is a Container. When the parent is a Viewport is works ok but then the columns stretch to fill the full height of the browser, not the 400 minheight specfied...

    Have I got a round hole and a square peg?

    Code:
     Ext.define('Pegfect.view.Viewport', {  extend: 'Ext.container.Container',
     
      renderTo: Ext.getBody(),
      layout: { type: 'hbox', pack: 'center', align: 'stretch' },
      minHeight: 400,
      defaults: { minHeight: 400 },
      items: [{
        flex: 1,
        style: { backgroundColor: '#023a60' }
      }, {
          width: 568
      }, {
        flex: 1,
        style: { backgroundColor: '#ffffff' }
      }]
    });

  2. Turns out it was just a case of telling the container to doLayout on window resize:

    Code:
    launch: function () {
        var vp = Ext.create('Pegfect.view.Container', {
          renderTo: document.body
        });
        Ext.EventManager.onWindowResize(vp.doLayout, vp);
      }

  3. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    82
    Answers
    7
    Vote Rating
    1
    dr-dan is on a distinguished road

      1  

    Default


    Turns out it was just a case of telling the container to doLayout on window resize:

    Code:
    launch: function () {
        var vp = Ext.create('Pegfect.view.Container', {
          renderTo: document.body
        });
        Ext.EventManager.onWindowResize(vp.doLayout, vp);
      }

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi