Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10551] iOS: View: View shown distorted on orientation change when pinched to a large size

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-27T08:43:28.000+0000
Affected Version/sRelease 2.1.2
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsapi, qe-ios082012
ReporterSatyam Sekhri
Assigneejithinpv
Created2012-08-22T06:11:37.000+0000
Updated2017-03-17T18:46:12.000+0000

Description

The view is shown distorted (like being cut diagonally) during orientation change when the when the view is pinched to a large size. As the size of the the view increases the distortion during orientation change also increases. This is not a regression. The issue occurs atleast as far as 2.0.1 Steps to Reproduce: 1. Create an application with the code below and launch the application 2. Pinch on the red view to increase the size. Increase the size till height and width of the view are in 8 digits (this is when the issue starts getting visible) 3. Change the orientation of the device Actual: While change in orientation a the view is shown distorted with a diagonal line cutting the view. As the size of the view is further increased the view gets more distorted. Expected: The view should be smooth with no distortion on orientation change.
            var win = TI.UI.createWindow();
		
	 	win.backgroundColor = '#fff';
	    
	    var baseHeight = 250;
		var baseWidth = 250;
		 
		var view = Ti.UI.createView({
		    height: baseHeight,
		    width: baseWidth,
		    backgroundColor: '#a00'
		});
		
		var label = Ti.UI.createLabel({
		    text: baseWidth + ' x ' + baseHeight,
		    color: '#fff',
		    font: {
		        fontSize: 24,
		        fontWeight: 'bold'
		    }
		});
		
		view.add(label);
		win.add(view);
		 
		view.addEventListener('pinch', function(e) {
		    view.height = baseHeight * e.scale;
		    view.width = baseWidth * e.scale;
		    label.text = Math.round(view.width) + ' x ' + Math.round(view.height);
		});
		
		view.addEventListener('touchstart', function(e) { 
		    baseHeight = view.height;
		    baseWidth = view.width;
		});
                win.open();

Comments

  1. jithinpv 2013-03-27

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. jithinpv 2013-06-21

    Issue does not reproduces Tested with iOS SDK: 5.1 iOS iPhone Simulator: 5.1 Mac OS X Version 10.7.5 Titanium SDK version 3.1.1.v20130606121419 Titanium Studio, build: 3.0.1.201212181159
  3. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source