{ "id": "89305", "key": "TIMOB-8466", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-03-31T14:54:59.000+0000", "created": "2012-03-31T05:31:27.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "mw-list" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-28T23:48:58.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "I have a view with a vertical layout, and an image and a label as children. The label is left aligned. The expected behavior, which is default on native, is for an auto-size label to center horizontally.\r\n\r\n!https://img.skitch.com/20120331-pthpnir3wmjg18k27q8puhjurr.png!\r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: vertical aligned views need to center-align children", "creator": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "189387", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Auto-sized labels are center-aligned by default in vertical alignments. There is probably some other subtly in your code causing the problems. Can you attach it?", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-31T13:41:34.000+0000", "updated": "2012-03-31T13:41:34.000+0000" }, { "id": "189388", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As confirmation, you can run the following test case:\r\n\r\n{code}\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nwin1.open();\r\n\r\nvar container = Ti.UI.createView({\r\n\tleft: 10,\r\n\tright: 10,\r\n\ttop: 10,\r\n\tbottom: 10,\r\n\tlayout: \"vertical\"\r\n});\r\nwin1.add(container);\r\n\r\ncontainer.add(Ti.UI.createImageView({\r\n\timage: \"KS_nav_ui.png\",\r\n\twidth: 100\r\n}));\r\ncontainer.add(Ti.UI.createLabel({\r\n\ttext: \"hi\"\r\n}));\r\n{code}", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-31T13:47:05.000+0000", "updated": "2012-03-31T13:47:05.000+0000" }, { "id": "189391", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After doing some investigation, it turns out this bug is fixed in TIMOB-7799, which is currently waiting in pull request. There was a problem with alignment with vertical when the container and the child were both SIZE combined with a few other parameters (very subtle).", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-31T14:54:59.000+0000", "updated": "2012-03-31T14:56:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }