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

iOS: ImageView - Image changes its position on the screen if orientation is changed

    Details

      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: 'photo.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:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                amittal Anshu Mittal
                Reviewer:
                Sabil Rahim
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration