Results 1 to 2 of 2

Thread: Why activate event run tow times every time.

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default Why activate event run tow times every time.

    My code below.My problem is when the viewport start the "TopCarousel" activate event will run two times every time.If the "TopCarousel" loaded tow times? Somebody can help me fix the bug.Thanks a lot!


    Code:
    Ext.define('TopCarousel', {
        extend: 'Ext.Carousel',
        config: {
    		layout:'card',
                    indicator: true,
    		height:160,
    		ui:'dark',
    		scrollable: {
    				direction: false,
    				directionLock: false
    				},
    		items:[
    			{html:'Carousel1'},
    			{html:'Carousel2'}
    			],
    		listeners:{
    			    activate:function(){console.log(1);}
    			   }
    				
    	}
    });
    
    
    Ext.application({
       launch: function() {
    	   
    	    var Content=Ext.create('Ext.Panel',{"
    			fullscreen:true,
    			items:[
    					new TopCarousel,
    					{
    						xtype:'panel',
    						html:'DownContent'
    						}
    			
    					]
    			
    			});
    		
    		Ext.Viewport.add(Content);
        }
    
    
    });
    Last edited by mitchellsimoens; 24 Apr 2012 at 7:53 AM. Reason: added [CODE] tags

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Vote Rating
    1368
      0  

    Default

    The active item is changed many times for the Content panel.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

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

Posting Permissions

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