1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Paris, France
    Posts
    46
    Answers
    1
    Vote Rating
    0
    Arekkk is on a distinguished road

      0  

    Default Unanswered: Listen to Carousel drag/swipe event

    Unanswered: Listen to Carousel drag/swipe event


    Hi guys,
    I wanna listen to the Carousel swipes event to fire some other stuff.
    Can't find any listener regarding this.

    Any idea ?

    Thanks !
    Alex

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    34
    Answers
    10
    Vote Rating
    8
    Johnny Major will become famous soon enough

      1  

    Default


    You could listen for the dragstart event on the element.

    Example

    Code:
    Ext.define('YourApp.view.Workspace', {
        extend : 'Ext.Carousel',
        xtype : 'workspace',
    
    
        config : {
            styleHtmlContent: true,
            items: [{
                html : 'Item 1'
            },{
                html : 'Item 2'
            },{
                html : 'Item 3'
            }]
        },
    
    
        initialize : function(){
            var me = this;
            me.element.on({
                dragstart: function(){
                    me.fireEvent('onDragStart');
                }
            });
        }
    });

Thread Participants: 1

Tags for this Thread