1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    tech_help is on a distinguished road

      0  

    Default Unanswered: Zoom images inside tab panel

    Unanswered: Zoom images inside tab panel


    Hi,

    I need to implement zoom in/out image which is placed in the panel inside a tab panel. am using sencha touch 1.1 framework. I have tried the following code which is not working for the images which are placed inside a tabpanel
    Code:
    graph.add({
    title: 'Graph',
    html: '<img alt="loading graph" width="100%" style="padding:10px 10px 10px 10px;" src="chart.png"></img><br />'
    });
    
    graph.doLayout();
    
    graph.body.select('img').on({
    pinchstart: function(e, t){
    this.startScale = this.scale;
    },
    
    pinch: function(e, t){
    this.scale = e.scale * this.startScale;
    t.style.webkitTransform = 'scale(' + this.scale + ')';
    },
    
    scope: {
    scale: 1
    }
    Pls help me with the sample code which can be used for zoom in/out in pinch event.

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    873
    Answers
    3567
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What are some of the values this.scale is like?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    tech_help is on a distinguished road

      0  

    Default


    Hi mitchellsimoens,

    am not very sure abt the scale parameter. The piece of code wht i have attached worked for the image which is in the panel. After i put the panel inside the tabpanel only its not working.

    Pls help

    thanks

Thread Participants: 1