Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    24
    Vote Rating
    0
    deepaknair.g is on a distinguished road

      0  

    Question Unanswered: AUTO SLIDING IN CAROUSEL while using MVC architecture

    Unanswered: AUTO SLIDING IN CAROUSEL while using MVC architecture


    Hi ,
    I am trying to enable autoslide to my carousel.In my application,the carousel is a child of which viewport is a parent.I couldn't call/define any function in the 'listeners'.Whenever I refer the element using "this",I think the reference points to the parent viewport ,Also,my attempt to use the 'xtype' also failed.Can anyone help me?

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,395
    Answers
    148
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi.
    Can you post some code on how are you trying to do that just to understand your application architecture and find the scope issue?
    Thank you
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    24
    Vote Rating
    0
    deepaknair.g is on a distinguished road

      0  

    Default


    Hi,
    I have a tab panel as parent.Inside that I have two panels.In one of that panel,I have a carousel and a list.
    I have to make that carousel to slide automatically in a specific interval.Let me show the code of my carousel. Hopefully awaiting your reply.

    CODE:
    Code:
    
    
    Code:
    Ext.define('Sencha.view.Article', { extend: 'Ext.Carousel',
    xtype: 'articlespage',
    
    layout: 'card',
    cardSwitchAnimation: 'fade',
    config: {
    title: 'Articles',
    iconCls: 'star',
    height: 400,
    
    items: [
    {
    html:"some html text and image here",
    style: 'background-color:#110310;',
    ui:'light'
    
    
    },
    
    
    {
    html:"some html text and image here",
    style: 'background-color:#110310;',
    ui:'light'
    
    
    }
    
    
    ],
    listeners:
    {
    // Here I couldn't get access to the object of carousel.I couldn't use "this" or "xtype" here.// 
    
    }
    
    }
    });
    
    

    How can I access the object of my carousel?...

    Once again thanks.....

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Answers
    1
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default


    Do you also need listen for user interaction with the carousel and delay automation until the user stops interacting with the carousel?

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Answers
    1
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default


    oh… by object what are you referring to the carousel component, root level Ext.Element or items within the carousel?

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    24
    Vote Rating
    0
    deepaknair.g is on a distinguished road

      0  

    Default


    Hi oddz,
    Thanks.I meant exactly what you have asked.The carousel autosliding should be delayed while user interacts with it.So I have to listen for user interaction.
    By object, I thought of referring the root level Ext. element,I mean the carousel itself.But it will be great if you can provide pieces of code for accessing both,items within the carousel, as well as root level element. Hopefully awaiting your reply...