{ "id": "61541", "key": "TIMOB-909", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:38.000+0000", "created": "2011-04-15T02:39:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:38.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": "{html}
http://helpdesk.appcelerator.net/tickets/2091
\nrun Platform => Platform data.
\nif you lay the device down the height/width report values for\nlandscape even though the phone is in portrait
Also, if your app starts in landscape, the values are incorrect.\nhere't the code:
\nvar appwin = Titanium.UI.createWindow();
\nappwin.orientationModes = [
\n Titanium.UI.LANDSCAPE_LEFT,\n Titanium.UI.LANDSCAPE_RIGHT\n ];
\n
\nvar trackedItemLabel = Ti.UI.createLabel({
\n width:160,\n backgroundColor: '#f00',\n height:40,\n text: 'click',\n textAlign:'center',\n font: {fontFamily:'Helvetica Neue',fontSize:20},\n left: 100,\n top: 100
\n
\n});
\nappwin.add(trackedItemLabel);
\ntrackedItemLabel.addEventListener(\"click\",function(e) {
\nTi.API.info('Ti.Platform.displayCaps.platformWidth = ' + Ti.Platform.displayCaps.platformWidth);
\n
\n});
\nappwin.open();
(from [a3daa3e6417c09713741ad82b048ec0d4cf6cf96])\nCloses #909; Distinction between Device orientation and\nUI orientation made, adding Ti.Platform.displayCaps.isUIPortrait ,\nwhich is now used by platformWidth and platformHeight. \nhttp://github.com/appcelerator/titanium_mobile/commit/a3daa3e6417c0...