{ "id": "104363", "key": "TIMOB-11949", "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": "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-04-08T08:17:07.000+0000", "created": "2012-11-03T14:08:12.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_label", "qe-closed-3.3.0", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-05-06T09:34:16.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": "Following a [pull request|https://github.com/appcelerator/titanium_mobile/pull/2932] of mine, a regression appeared. Setting backgroundImage on creation was not working.\r\nThis is due to the fact that the layer was not created.\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\twidth:100,\r\n\theight:60,\r\n\ttop:50,\r\n\tleft:10,\r\n\ttext:'This is a test',\r\n\tbackgroundPaddingTop:20,\r\n\tbackgroundPaddingLeft:20,\r\n\tbackgroundPaddingRight:20,\r\n\tbackgroundImage:'KS_nav_UI.png'\r\n})\r\nwin.add(label);\r\n\r\nvar b3 = Titanium.UI.createButton({\r\n\ttitle:'animate',\r\n\theight:40,\r\n\twidth:200,\r\n\tbottom:10\r\n});\r\nvar small = false;\r\nb3.addEventListener('click', function()\r\n{\r\n\tif (!small)\r\n\t\tlabel.animate({\r\n\t\t\twidth:140,\r\n\t\t\theight:25,\r\n\t\t\ttop:10,\r\n\t\t\tleft:40\r\n\t\t});\r\n\telse\r\n\t\tlabel.animate({\r\n\t\t\twidth:100,\r\n\t\theight:60,\r\n\t\ttop:50,\r\n\t\tleft:10\r\n\t\t});\r\n\tsmall = !small;\r\n});\r\nwin.add(b3);\r\nwin.open();\r\n{code}\r\nNow the label doesnt have a custom bgd layer. Instead it uses the TiUIView bgd layer.\r\nAnd it overloads the method used to set the frame of the bgd layer to add padding\r\n\r\nThe example shows that setting the background image works on creation. But also that the new implementation didnt break padding, even with animations.", "attachment": [], "flagged": false, "summary": "iOS: Label backgroundImage not set correctly on creation", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.1.0 master\r\nios sdk 6.0\r\n", "comment": { "comments": [ { "id": "226089", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "pull request https://github.com/appcelerator/titanium_mobile/pull/3376", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-11-03T14:15:43.000+0000", "updated": "2012-11-03T14:15:43.000+0000" }, { "id": "300112", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Need to verify that this may already be fixed.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-07T21:29:42.000+0000", "updated": "2014-04-07T21:29:42.000+0000" }, { "id": "300181", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot Reproduce with latest master with the test case from above. This could have fixed with the other view refactor that we had made in 3.3.0. Marking as Fixed.", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-08T08:16:55.000+0000", "updated": "2014-04-08T08:16:55.000+0000" }, { "id": "303633", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the issue:\r\nAppc-Studio:3.3.0.201405011408\r\nsdk:3.3.0.v20140505115416\r\nacs:1.0.14\r\nalloy:1.4.0-dev\r\nnpm:1.3.2\r\ntitanium:3.3.0-dev\r\ntitanium-code-processor:1.1.1\r\nxcode:5.1.1\r\nDevice:Ipod Touch1(7.0),Nexus7(v4.3)\r\n\r\nLabel backgroundImage set properly while creation. Used the above mentioned code in description.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-06T09:33:55.000+0000", "updated": "2014-05-06T09:33:55.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }