Results 1 to 8 of 8

Thread: showAnimation doesn't work when centered is true in beta2

  1. #1
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default showAnimation doesn't work when centered is true in beta2

    This is the code

    PHP Code:
    Ext.Viewport.add({
               
    xtype:'img',
                
    showAnimation: {
                    
    type'pop',
                    
    duration500
                   
    easing'ease-out'
                
    },
                
    src:src,
                
    height:'70%'
               
    width:'70%',
              
    //centered:true
            
    }).show(); 
    Also it doesn't work when passing animation config object to the show method, even if the centered is false.

    The animations are also not present when setting left, top etc. to some value.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    What version are you using? The code above works in the latest release.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default

    I'm using the latest, with sencha-touch-all-debug.js, but have tried with other builds with the same result. The code above works because the centered property is commented out.

    The following code doesn't work:

    Code:
    Ext.define('Bugs.view.Viewport', {    extend:'Ext.Container',
        config:{
            fullscreen:true,
            items:[
                {
                    xtype   : 'button',
                    text    : 'Show Popup',
                    centered: true,
                    handler : function() {
    
    
                        var popup = Ext.Viewport.add(
                            {
                                xtype        : 'img',
                                showAnimation: 'pop',
                                src          :'http://www.sencha.com/img/sencha-large.png',
                                height       :'70%',
                                width        :'70%',
                                centered     :true
                            });
                        popup.show();
                    }
                }
            ]
        }
    });
    
    
    Ext.Loader.setConfig({ enabled: true });
    Ext.application({
        name: 'Bugs',
        launch: function() {
            Ext.create('Bugs.view.Viewport');
        }
    });
    I have tested on OS X 16.8 with the latest Chrome and with the iOS 5 simulator.

    The problem is that the animation isn't shown when the image is centered. This happens because the image is shown when is added to the Viewport. If I set the "hidden:true" then it works as it should. I'm not sure if this is a bug or not, but setting the hidden to true solves the issue.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243

    Default

    If I remember correctly, I have seen this coming by as a bug in our tracker in the past week. Could you confirm if you still experience this issue after the next release? It will be out very soon.

  5. #5
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default

    Sure, no problem. By the way great work guys, you're releasing very fast!

  6. #6
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default

    The issue is resolved in Beta3

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    454

    Default Still a bug?

    I think this bug is still present in v 2.0.1. I've been scratching my head as to why when I set a centred animation the animation is not present and just appears.

    I've been studying the touchstyle and Kiva examples to see if I can work out how they did it as touchstyle doesn't seem to have this problem. That one uses a sheet and possibly hidden set to true I will check.

    Do you have a very basic example that works centred+animation with either a sheet or panel? I've been fiddling for a day now!

    :-)

  8. #8
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default

    Last time I checked it was resolved. One workaround I found while it wasn't was to set the hidden property to true initially in the configuration and then when you want to show and animate the panel just call panel.show();

Posting Permissions

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