Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Cologne, Germany
    Posts
    27
    Vote Rating
    0
    jan.harmsen is on a distinguished road

      0  

    Default [OPEN]Component config property 'margin' issues

    [OPEN]Component config property 'margin' issues


    Applies to Ext JS 4 Preview 1

    It looks like ExtJS 3 'margins' config property has become 'margin' in ExtJS4. This is not documented properly.
    'margins' can still be used as it seems, but when provided as object, it does not get rendered properly, see testcase below (margin left becomes margin right when rendered, margin top becomes margin bottom when rendered).

    Code:
    Ext.onReady(function(){
    
    
        // ---- Create Viewport with border layout ----------------------
        Ext.create('Ext.Viewport',{
            layout: 'border',
            padding:20,
            defaults: {
                    padding: 5,
                    frame: true
            },
            items:[
                {
                    region: 'north',
                    title: 'Panel North',
                    html: '<h2>I am North with a left margin of 150 and top and bottom margin of 5</h2>',
                    //
                    // ExtJS 3 'margins' config property as defined in BoxComponent is now
                    // ExtJS 4 'margin' as defined in Ext.Component
                    //
                    // margin config works when provided as String
                    //margin: '5 0 5 150',
                    //
                    // margin config also works when provided as Object
                    //margin: {top:5, right:0, bottom:5,left:150},
                    //
                    // outdated margins config works NOT correctly in Ext4 preview 1 when provided as Object
                    margins: {top:5, right:0, bottom:5,left:150},
                    //
                    // outdated margins config works correctly when provided as String
                    //margins: '5 0 5 150',
                    flex: 0.5
                },
                {
                    region: 'west',
                    title: 'Panel West',
                    html: '<h2>I am West</h2>',
                    flex: 0.75
                },
                {
                    region: 'center',
                    title: 'Panel Center',
                    html: '<h2>I am Center</h2>',
                    margins: '0 5 0 5'
                },
                {
                    region: 'east',
                    title: 'Panel East',
                    html: '<h2>I am East</h2>',
                    flex: 0.75
                }
            ]
        });
    // END of onReady    
    });

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    There's no change in config names.

    What has changed is that you must now use the string form of the configuration.

    I'll look into this.

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Cologne, Germany
    Posts
    27
    Vote Rating
    0
    jan.harmsen is on a distinguished road

      0  

    Default


    Strange...
    Why then do the Ext4 docs for Component use 'margin' and it works with 'margin' as string and object?

    I currently do not have the time to further investigate, just wanted to point this out.

    Thanks for looking into this!

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, the way it is processed has been changed. I have just fixed this to accept margin and margins as configuration.

Similar Threads

  1. Replies: 0
    Last Post: 28 Sep 2010, 8:41 AM
  2. animate margin property
    By hpet in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Aug 2010, 9:57 AM
  3. Replies: 11
    Last Post: 17 May 2010, 8:13 AM
  4. Replies: 2
    Last Post: 29 Mar 2010, 3:00 PM

Thread Participants: 1

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..."