Results 1 to 3 of 3

Thread: Zoom images inside tab panel

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    What are some of the values this.scale is like?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      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

Posting Permissions

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