1. #11
    Sencha User
    Join Date
    Sep 2007
    Location
    Tulsa, Oklahoma
    Posts
    178
    Vote Rating
    1
    ckr is on a distinguished road

      0  

    Default


    Great! Everything appears to be working in IE, FF, Chrome (only ones I tested).
    I will leave the demo up for awhile incase others wish to see. Thanks Animal! Thanks Gugman!

    Here was what I finally ended up with code wise:

    Code:
    Ext.override(Ext.layout.CardLayout, {
        setActiveItem : function(item){
            item = this.container.getComponent(item);
            if(this.activeItem != item){
                if (item.rendered && this.animate) {
    
                    Ext.Fx.syncFx();
                    if (this.activeItem) {
    
    //                  Correct top position of card because they have to occupy the same space
    //                  during animation.
                        var n = item.getEl();
                        n.setStyle({
                            position: 'absolute',
                            top: this.container.getLayoutTarget().getPadding('t') + 'px'
                        });
                        this.activeItem.getEl().fadeOut({
                            useDisplay: true,
                            callback: Ext.Component.prototype.hide,
                            scope: this.activeItem
                        });
                    }
                    this.activeItem = item;
                    item.show();
                    this.layout();
                    n.fadeIn({
                        callback: function() {
                            n.setStyle({
                                position: 'relative'
                            });
                        }
                    });
                    Ext.Fx.sequenceFx();
                } else {
                    if(this.activeItem){
                        this.activeItem.hide();
                    }
                    this.activeItem = item;
                    item.show();
                    this.layout();
                }
            }
        }
    });
    Thanks!
    Chuck

  2. #12
    Ext JS Premium Member vishalg's Avatar
    Join Date
    Sep 2007
    Location
    Los Angeles, CA
    Posts
    75
    Vote Rating
    0
    vishalg is on a distinguished road

      0  

    Thumbs up


    Quote Originally Posted by Animal View Post

    Code:
    n.setStyle({
        position: '',
    });
    should remove ',' to use in IE.

    How hard would it be to support different effects ?

    Thanks for this extension animal.

  3. #13
    Sencha User
    Join Date
    Sep 2007
    Location
    Tulsa, Oklahoma
    Posts
    178
    Vote Rating
    1
    ckr is on a distinguished road

      0  

    Default


    Ya that was corrected in my post.

    Also check here there is a demo in that post.
    Thanks!
    Chuck

  4. #14
    Sencha User
    Join Date
    Feb 2008
    Posts
    23
    Vote Rating
    0
    Buzzwords is on a distinguished road

      0  

    Default


    Has this override been incorporated into Extjs 4 proper? Does anyone know?