Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9260] iOS: Image positions to the top/left corner after zooming/pinching

GitHub Issuen/a
TypeBug
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 1.8.2, Release 2.0.1, Release 3.2.2
Fix Version/sRelease 2.1.0, Sprint 2012-12 Core
ComponentsiOS
LabelsSupportTeam, core, iOS7, module_imageview, qe-testadded
ReporterVarun Joshi
AssigneeUnknown
Created2012-05-24T14:08:33.000+0000
Updated2018-02-28T20:03:37.000+0000

Description

Problem

When zoom/pinching the image on editing part after taking picture, the image position itself to the upper left corner part of the scrollable view.

Sample Code

Please run the attached sample project. The image does not position to the center when zooming in.

Steps to reproduce

1. Run the app on device 2. Choose the option to select photo from library. 3. Select any image and try to pinch it. 4. The image always shifts towards top left on every pinch/zoom This video also shows how to reproduce the issue: http://youtu.be/_EOC6Amp3fQ

Attachments

FileDateSize
Archive.zip2012-05-24T14:08:33.000+00005026513

Comments

  1. Max Stepanov 2012-06-08

    Reduced test case:
       var win = Ti.UI.createWindow({ fullscreen: true, backgroundColor: 'white'});
            
       	var view = Ti.UI.createScrollView({
       		backgroundColor:'#000',
       		borderRadius:150,
       		height:300,
       		width:300,
       		contentHeight:'auto',
       		contentWidth:'auto',
       		minZoomScale:0.05,
       		maxZoomScale:3.0,
       		zoomScle:1.0
       	});
       	
       	var image = Ti.UI.createImageView({
       		image:'beach.jpg',
       		height:'auto',
       		width:'auto'
       	});
       	view.add(image);
       	win.add(view);
               win.open();
       
  2. Max Stepanov 2012-06-08

    PR pending https://github.com/appcelerator/titanium_mobile/pull/2363
  3. Blain Hamon 2012-06-15

    pull merged.
  4. Michael Pettiford 2012-06-18

    Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK2.1.0.v20120618134156 hash r00905cd0 OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
  5. Paras Mishra 2014-02-27

    Issue is reproducible on iOS7 device only during the zooming of the image. Environment used: Device : iPod touch 2 , iOS version: 7.1 SDK: 3.2.2.v20140221161255 CLI version : 3.2.1 OS : MAC OSX 10.9 Alloy: 1.3.1 ACS: 1.0.12 npm:1.3.2 Appcelerator Studio, build: 3.2.1.201402061120 titanium-code-processor: 1.1.0 XCode : 5.1 Beta 5

JSON Source