{ "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

\n

run Platform => Platform data.

\n

if you lay the device down the height/width report values for\nlandscape even though the phone is in portrait

{html}", "attachment": [], "flagged": false, "summary": "display width/height are not always correct", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124317", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Also, if your app starts in landscape, the values are incorrect.\nhere't the code:

\n

var appwin = Titanium.UI.createWindow();
\nappwin.orientationModes = [

\n
\n        Titanium.UI.LANDSCAPE_LEFT,\n        Titanium.UI.LANDSCAPE_RIGHT\n    ];\n
\n

var trackedItemLabel = Ti.UI.createLabel({

\n
\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

});

\n

appwin.add(trackedItemLabel);

\n

trackedItemLabel.addEventListener(\"click\",function(e) {

\n
\nTi.API.info('Ti.Platform.displayCaps.platformWidth = ' + Ti.Platform.displayCaps.platformWidth);\n
\n

});

\n

appwin.open();

{html}", "updateAuthor": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:39:01.000+0000", "updated": "2011-04-15T02:39:01.000+0000" }, { "id": "124318", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:39:01.000+0000", "updated": "2011-04-15T02:39:01.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }