0 Replies Latest reply on Oct 11, 2011 9:06 AM by VivD

    Zoom gesture not working when image scaled to screen size

    VivD Level 1

      I fetch images (images are much larger than mobile size/resolution) from an API and wanted to display them on the mobile ensuring the image is not stretched. After trying out a lot of settings I finally arrived at the one below.

       

           <s:VGroup width="100%" height="100%" >

         

                               <s:Image id="fullPhoto"

                           width="100%" height="100%"

                           scaleMode="letterbox" smooth="true"

                           source="{getSinglePhotoResult.lastResult.photo.image_url}" />

                </s:VGroup>

       

       

      Problem: I have been trying to implement zoom gesture for the images too but the images don't zoom when using the code above. it works if I remove the width and height values from the image tag as shown below. I suppose the width and height values kind of constrain the image size boundaries causing the zoom code to not work.

       

      <s:VGroup width="100%" height="100%" >

         

             <s:Image id="fullPhoto"

                           scaleMode="letterbox" smooth="true"

                           source="{getSinglePhotoResult.lastResult.photo.image_url}" />

      </s:VGroup>

       

       

      Is there another way to ensure the images show up fully on the screen utilizing as much space as it can without stretching?

      If not, what other options should I explore?