Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2008
    Posts
    70
    Vote Rating
    -2
    Trinad can only hope to improve

      0  

    Default Sencha Touch html content pinch and zoom

    Sencha Touch html content pinch and zoom


    Hi,

    Can some one tell me how to implement pinch and zoom for html content inside a carousel, I see there is an example how to do for image inside a carousel but I have no idea how to implement pinch and zoom for html content inside a carousel please help me.

    Thanks,
    Kumar.

  2. #2
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    176
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    you can change CSS styles for your html content on pinch event

  3. #3
    Sencha User
    Join Date
    Oct 2008
    Posts
    70
    Vote Rating
    -2
    Trinad can only hope to improve

      0  

    Default


    Hi,

    Thanks for your reply. Is there any example how to do that ?

    Thanks,
    Kumar.

  4. #4
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    176
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    no examples, but you can write your own one.


    1) define some styles for scaling:
    .x1{font-size: 10px; ...} .x2{font-size: 14px; ...} .x3{font-size: 18px; ...} .x4{font-size: 22px; ...}


    2) create container with your html content inside carousel


    3) on container element listen for pinchstart, pinch and pinchend events
    containerObj.element.on({
    pinchstart: function() {...}
    });


    4) change actual style of container (event handlers)

    But if you want to scale unknown html content (for example grabbed from Internet) - you can not. You can work with known styles only

    also exist not a trivial method to draw html into canvas and then you can scale a canvas. But this task is so complex for beginners and has to many limitations.

  5. #5
    Sencha User
    Join Date
    Oct 2008
    Posts
    70
    Vote Rating
    -2
    Trinad can only hope to improve

      0  

    Default


    kostysh,

    Thanks for your example.
    I have forget to send the response to your post sorry about that.
    I have used iscroll4 it worked for me.
    I hope in future sencha touch Framework will provide this feature.

    Thanks,
    Kumar.

  6. #6
    Sencha User
    Join Date
    Jul 2008
    Posts
    85
    Vote Rating
    0
    kohyea is on a distinguished road

      0  

    Default


    Hello Trinad,
    Can you please tell me how did you use iscroll4 to fix this issue?

    Thanks,
    Kohyea

Thread Participants: 2