{
"id": "124617",
"key": "TIMOB-16177",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "10153",
"key": "TIMOB",
"name": "Titanium SDK/CLI",
"projectCategory": {
"id": "10100",
"description": "Titanium and related SDKs used in application development",
"name": "Client"
}
},
"fixVersions": [
{
"id": "15821",
"description": "2014 Sprint 02",
"name": "2014 Sprint 02",
"archived": true,
"released": true,
"releaseDate": "2014-01-31"
},
{
"id": "15823",
"description": "2014 Sprint 02 API",
"name": "2014 Sprint 02 API",
"archived": true,
"released": true,
"releaseDate": "2014-01-31"
},
{
"id": "15422",
"description": "Release 3.3.0",
"name": "Release 3.3.0",
"archived": false,
"released": true,
"releaseDate": "2014-07-16"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2014-01-22T21:14:01.000+0000",
"created": "2014-01-09T19:45:46.000+0000",
"priority": null,
"labels": [
"module_orientation",
"qe-closed-3.3.0",
"qe-testadded",
"supportTeam"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "srahim",
"key": "srahim",
"displayName": "Sabil Rahim",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2014-07-28T18:16:24.000+0000",
"status": {
"description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.",
"name": "Closed",
"id": "6",
"statusCategory": {
"id": 3,
"key": "done",
"colorName": "green",
"name": "Done"
}
},
"components": [
{
"id": "10206",
"name": "iOS",
"description": "iOS Platform"
}
],
"description": "*Problem Description*\r\n\r\nOpening a modal window with a Scrollable view, with orientationModes set to LANDSCAPE_LEFT & LANDSCAPE_RIGHT display incorrectly. Image displays upside down, however can be reset by turning the phone one way then back again. \r\n\r\n*Reproduction Steps*\r\n1. Run the code below in a new Alloy Project.\r\n2. Tilt the device to the left and notice the image is upside down instead of showing in.LANDSCAPE_RIGHT.\r\n3. Press Close\r\n4. Tilt device to the right and notice the image is showing LANDSCAPE_LEFT which is correct\r\n\r\n*index.js*\r\n{code}\r\n$.win.open();\r\n\r\nfunction openGallery() {\r\n\tif(Alloy.Globals.photoViewerOpen) {\r\n\t\treturn;\r\n\t}\r\n\tvar photoViewer = Alloy.createController('LandscapePhotoViewer').getView();\r\n\tphotoViewer.open();\r\n}\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(e) {\r\n\tif(e.orientation === Ti.UI.LANDSCAPE_LEFT || e.orientation === Ti.UI.LANDSCAPE_RIGHT) {\r\n\t\topenGallery();\r\n\t}\r\n});\r\n{code}\r\n*index.tss*\r\n{code}\r\n\".container\": {\r\n\tbackgroundColor:\"white\",\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL,\r\n\torientationModes: [Ti.UI.PORTRAIT]\r\n},\r\n\"#title\": {\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"orange\",\r\n\tfont : {\r\n\t\tfontSize : 30\r\n\t},\r\n\ttextAlign : \"center\"\r\n},\r\n\"#indexView\":{\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL,\r\n\tlayout : 'vertical',\r\n\ttop : 30\r\n},\r\n\"#galleryOpen\":{\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 30\r\n}\r\n{code}\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n\r\n*LandscapePhotoViewer.js*\r\n{code}\r\nvar PHOTOS = [\r\n\t'images/1.jpg',\r\n\t'images/2.jpg',\r\n\t'images/3.jpg',\r\n\t'images/4.jpg'\r\n];\r\n\r\nvar galleryArray = [];\r\n\r\nfunction constructGallery() {\r\n\tfor(var x = 0; x < 4; x++) {\r\n\t\tvar imgPhoto = Ti.UI.createImageView({\r\n\t\t\timage: PHOTOS[x],\r\n\t\t\theight: Ti.UI.SIZE,\r\n\t\t\twidth: Ti.UI.FILL\r\n\t\t});\r\n\r\n\t\tgalleryArray.push(imgPhoto);\r\n\t}\r\n\r\n\t$.scroll.setViews(galleryArray);\r\n}\r\n\r\nfunction backUp() {\r\n\tAlloy.Globals.photoViewerOpen = false;\r\n\t$.galleryWin.close();\r\n}\r\nAlloy.Globals.photoViewerOpen = true;\r\nconstructGallery();\r\n{code}\r\n*LandscapePhotoViewer.tss*\r\n{code}\r\n\"#galleryWin\":{\r\n\theight : Ti.UI.FILL,\r\n\twidth : Ti.UI.FILL,\r\n\tbackgroundColor : \"orange\",\r\n\tfullscreen : true,\r\n\tmodal : true,\r\n\torientationModes: [Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT]\r\n},\r\n\"#backButton\":{\r\n\twidth : 60,\r\n\theight : 30,\r\n\tbackgroundColor : \"red\",\r\n\tcolor : \"white\",\r\n\ttop : 10,\r\n\tright : 10,\r\n\tzIndex : 10,\r\n\ttextAlign : \"center\"\r\n},\r\n\"#scroll\":{\r\n\theight : Ti.UI.FILL,\r\n\twidth : Ti.UI.FILL,\r\n\tbackgroundColor: 'transparent'\r\n}\r\n{code}\r\n*LandscapePhotoViewer.xml*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}",
"attachment": [
{
"id": "45013",
"filename": "LANDSCAPE_LEFT.jpg",
"author": {
"name": "shockoe",
"key": "shockoe",
"displayName": "SHOCKOE TEAM",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-09T19:45:46.000+0000",
"size": 1674403,
"mimeType": "image/jpeg"
},
{
"id": "45014",
"filename": "LANDSCAPE_RIGHT.jpg",
"author": {
"name": "shockoe",
"key": "shockoe",
"displayName": "SHOCKOE TEAM",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-09T19:45:46.000+0000",
"size": 1708696,
"mimeType": "image/jpeg"
},
{
"id": "45067",
"filename": "left.png",
"author": {
"name": "mrahman",
"key": "mrahman",
"displayName": "Mostafizur Rahman",
"active": true,
"timeZone": "Asia/Dhaka"
},
"created": "2014-01-13T04:43:25.000+0000",
"size": 136704,
"mimeType": "image/png"
},
{
"id": "45068",
"filename": "right.png",
"author": {
"name": "mrahman",
"key": "mrahman",
"displayName": "Mostafizur Rahman",
"active": true,
"timeZone": "Asia/Dhaka"
},
"created": "2014-01-13T04:43:25.000+0000",
"size": 138582,
"mimeType": "image/png"
}
],
"flagged": false,
"summary": "iOS LANDSCAPE Orientation Upside Down",
"creator": {
"name": "shockoe",
"key": "shockoe",
"displayName": "SHOCKOE TEAM",
"active": true,
"timeZone": "America/New_York"
},
"subtasks": [],
"reporter": {
"name": "shockoe",
"key": "shockoe",
"displayName": "SHOCKOE TEAM",
"active": true,
"timeZone": "America/New_York"
},
"environment": "Titanium SDK 3.2.0GA\r\nAlloy 1.3.0\r\niPhone 5 (7.0.3)",
"comment": {
"comments": [
{
"id": "288047",
"author": {
"name": "srahim",
"key": "srahim",
"displayName": "Sabil Rahim",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "simplified commonjs code \n{code}\nvar win1 = Titanium.UI.createWindow({backgroundColor:'white'});\nvar opened = false;\nfunction openModal() {\n\tif(opened){\n\t\treturn;\n\t}\n var winModal = Titanium.UI.createWindow({\n \tbackgroundColor:'red',\n \tmodal:true,\n \torientationModes:[Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT]\n \n });\n\n var label = Ti.UI.createLabel({text:\"Close Window\"});\n label.addEventListener('click',function(){\n \topened = false;\n \twinModal.close();\n });\n winModal.add(label);\n opened =true;\n winModal.open();\n}\n\n\nTi.Gesture.addEventListener('orientationchange', function(e) {\n if(e.orientation === Ti.UI.LANDSCAPE_LEFT || e.orientation === Ti.UI.LANDSCAPE_RIGHT) {\n openModal();\n }\n});\n\nwin1.open();\n{code}",
"updateAuthor": {
"name": "srahim",
"key": "srahim",
"displayName": "Sabil Rahim",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2014-01-14T00:54:55.000+0000",
"updated": "2014-01-14T00:54:55.000+0000"
},
{
"id": "288366",
"author": {
"name": "srahim",
"key": "srahim",
"displayName": "Sabil Rahim",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "https://github.com/appcelerator/titanium_mobile/pull/5225",
"updateAuthor": {
"name": "srahim",
"key": "srahim",
"displayName": "Sabil Rahim",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2014-01-15T23:26:42.000+0000",
"updated": "2014-01-15T23:26:42.000+0000"
},
{
"id": "289291",
"author": {
"name": "vduggal",
"key": "vduggal",
"displayName": "Vishal Duggal",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "PR merged",
"updateAuthor": {
"name": "vduggal",
"key": "vduggal",
"displayName": "Vishal Duggal",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2014-01-22T21:14:01.000+0000",
"updated": "2014-01-22T21:14:01.000+0000"
},
{
"id": "302159",
"author": {
"name": "nmittal",
"key": "nmittal",
"displayName": "Neha Mittal",
"active": true,
"timeZone": "Asia/Kolkata"
},
"body": "Verified fix with below environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140422163054\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: iPhone 5C( iOS 7.1)\r\n\r\nLandscape orientation is working fine with code provided in comments. Hence Closing the issue.",
"updateAuthor": {
"name": "nmittal",
"key": "nmittal",
"displayName": "Neha Mittal",
"active": true,
"timeZone": "Asia/Kolkata"
},
"created": "2014-04-23T10:30:41.000+0000",
"updated": "2014-04-23T10:30:41.000+0000"
}
],
"maxResults": 7,
"total": 7,
"startAt": 0
}
}
}