Threaded View

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    31
    Answers
    1
    Vote Rating
    0
    pvmagacho is on a distinguished road

      0  

    Default Answered: Painted event in Navigation View

    Answered: Painted event in Navigation View


    I am trying to use the painted event of a Container that is pushed into a Navigation View, because I need to get an element position inside the Container:

    ex:
    'main' is the navigation view

    Code:
    main.push({
          xtype: 'container',
          listeners: [
                {
                    fn: 'onContainerPainted',
                    delay: 500,
                    event: 'painted'
                }
            ]
            onContainerPainted: function(component, options) {
                    var box = component.down('#myId').element.getBox();
                    // do something with box
            }
    });
    However, because of the animation of the navigation view I have to add a delay to the painted event (as shown above) otherwise the position retrieved by the getBox function is not correct.

    Is there any way to fire an event only after the push/pop animation ends ? I've also tryed the push/pop event, but that did not work either since these events are fired before the painted event.

    Thank you.

  2. For any Panel that uses card layout the following code works pretty well.

    Code:
            Ext.Viewport.getLayout().setAnimation({
                type: 'slide',
                duration: 200
            });
            var animation = Ext.Viewport.getLayout().getAnimation();
    
            animation.on({
                        animationend: function() {
                            // do stuff
                        },
                        scope: Ext.Viewport, 
                        single: true
            });
    
            Ext.Viewport.setActiveItem(Ext.create('MyApp.view.NextView'));

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