Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13643

iOS: ImageView - Image changes its position on the screen if zoomScale is greater than 1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.1.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      SDK: 3.1.0.v20130327135307
      Studio:3.0.2.201302191606
      Device: iPad mini(v 6.0)
      OS: OSX 10.7.5

      Description

      Image changes its position on the screen if orientation is changed. This is not regression since the issue occurs on 3.0.2 GA as well.

      Steps to reproduce:
      1. Create an app using the code below.
      2. Launch the test app.Wait for the image to load.
      3. Change Orientation to landscape and then again to portrait.

      Actual:
      The position of the image is changed on the screen.

      Expected:
      Position of the image should be same on the screen.

       
      var win = Ti.UI.createWindow({
          backgroundColor: 'white'
      });
       
      var scrollView = Ti.UI.createScrollView({
          maxZoomScale: 3,
          contentWidth: 'auto',
          contentHeight: 'auto'
      });
       
      var img = Ti.UI.createImageView({
          image: 'flower.jpg',
          width:Ti.UI.SIZE,
          hight: Ti.UI.SIZE
      });
       
      function onImageLoad(e) {
          var scaleWidth = win.size.width / img.size.width;
          var scaleHeight = win.size.height / img.size.height;
          // Set the initial ZoomScale
          // And the MinZoomScale
          scrollView.zoomScale = scrollView.minZoomScale = Math.min(scaleWidth, scaleHeight);
      }
       
      img.addEventListener('load', onImageLoad);
       
      scrollView.add(img);
      win.add(scrollView);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerriman Eric Merriman
                Reporter:
                amittal Anshu Mittal
                Reviewer:
                Sabil Rahim
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16314
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration