Results 1 to 3 of 3

Thread: doLayout isn't refreshing

  1. #1
    Touch Premium Member
    Join Date
    May 2011
    Location
    Norfolk & DC
    Posts
    100
    Answers
    1

    Default doLayout isn't refreshing

    The first time this panel is accessed, there is a button at the bottom. The second time, it's removed, but the space where the button was is still taking up space. Anyone have any ideas?

    Code:
    App.Terms = new Ext.Panel({
      id               : 'termsPanel',
      scroll           : 'vertical',
      layout           : 'fit',
      styleHtmlContent : true,
      html             : '<p>Lorem ipsum dolor sit amet...</p>',
      listeners        : {
        activate  : function() {
          if (Ext.is.iOS && !App.SettingsStore.getAt(0) && (!Ext.is.Standalone)) {
            this.getEl().mask();
            var child = App.Bookmark;
            child.show('pop');
            var width = (this.getWidth(false) - child.getWidth(false)) / 2;
            var height = Ext.is.Phone ?
              (this.getHeight(false) - child.getHeight(false) + 35) :
              (this.getHeight(false) - child.getHeight(false)) * 2 / 3;
            child.setPosition(width,height);
          }
        },
        beforeactivate : function(){
          if (typeof(App.SettingsStore.getAt(0))==='object') {
            App.TermsToolbar.add(App.AccountBackBtn);
            App.TermsToolbar.doLayout();
            this.remove(App.TermsBtns);
            this.doLayout();  // doesn't allow the content area to reclaim space
          } else {
            this.addDocked(App.TermsBtns);
          }
        }
      },
      dockedItems      : [
        App.TermsToolbar
      ]
    });
    twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    51
    Answers
    7

    Default

    I am having a similar problem (but with a removed toolbar of a detailCard in a nestedList) and while searching for a solution (still not found) i came across a thread where someone said you have to use doComponentLayout() after changing things. perhaps it will work for you.

  3. #3
    Touch Premium Member
    Join Date
    May 2011
    Location
    Norfolk & DC
    Posts
    100
    Answers
    1

    Default

    That really screws with the app and I get two panels occupying the same space at the same time. Thanks for the suggestion though.
    twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography

Tags for this Thread

Posting Permissions

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