{ "id": "134736", "key": "TIMOB-17593", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-04T03:57:51.000+0000", "created": "2014-08-14T07:45:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "TCSupport", "labels", "regression", "rendering", "toImage" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-01-16T01:00:51.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": "h4. Problem Description \r\n\r\nIn 3.3.0.GA all labels disappears when I do toImage() on their container view. This worked perfectly fine in all versions before 3.3.0.GA (try 3.2.3.GA for instance). This toImage()-approach is very useful to build images of the gui instead of having components (such as labels) rendered all the time. It makes the UI much snappier/performant and I use it alot. This is a complete stopper for me.\r\n\r\n\r\nh4. Sample Code\r\n{code:app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar view= require('FirstView');\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nwin1.add(view());\r\nwin1.open();\r\n\r\n{code}\r\n\r\n{code:FirstView.js}\r\n\r\nfunction FirstView() {\r\n \r\n var buildView = Ti.UI.createView({\r\n backgroundColor:'red',\r\n width:100,\r\n height:100\r\n });\r\n \r\n buildView.add(Ti.UI.createLabel({\r\n backgroundColor:'yellow',\r\n color:'#000000',\r\n text:'ABC',\r\n }));\r\n \r\n var container = Ti.UI.createView({\r\n width:100,\r\n height:100,\r\n backgroundImage: buildView.toImage()\r\n });\r\n \r\n return container;\r\n}\r\nmodule.exports = FirstView;\r\n\r\n{code}\r\n\r\nh4. Steps to reproduce \r\n\r\n- Create a new Project.\r\n- Copy the \"app.js\" code to the project \"app.js\" file.\r\n- Create a new file named \"FirstView\" in Projects Resource directory.\r\n- Copy the \"FirstView.js\" code to the project \"FirstView.js\" file.\r\n- Run the Project.\r\n\r\nh4. Actual results\r\n\r\nOBSERVED PROBLEM\r\nIn SDK version 3.2.3.GA the label is shown where in SDK version 3.3.0.GA the label despaired. view.toImage() is not working in New SDK 3.3.0.GA\r\n", "attachment": [ { "id": "50465", "filename": "3.2.3.GA.png", "author": { "name": "toby451", "key": "toby451", "displayName": "Tobias", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-08-14T07:45:32.000+0000", "size": 20812, "mimeType": "image/png" }, { "id": "50466", "filename": "3.3.0.GA.png", "author": { "name": "toby451", "key": "toby451", "displayName": "Tobias", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-08-14T07:45:33.000+0000", "size": 19478, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Labels not layed out correctly on toImage()", "creator": { "name": "toby451", "key": "toby451", "displayName": "Tobias", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "toby451", "key": "toby451", "displayName": "Tobias", "active": true, "timeZone": "Europe/Berlin" }, "environment": "CLI version 3.3.0.GA\r\nTitanium SDK version 3.3.0.GA and 3.2.3.GA\r\niOS Simulator.\r\n", "closedSprints": [ { "id": 241, "state": "closed", "name": "2014 Sprint 22 SDK", "startDate": "2014-10-27T22:25:43.407Z", "endDate": "2014-11-08T01:00:00.000Z", "completeDate": "2014-11-10T20:10:00.899Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "324680", "author": { "name": "pennadl", "key": "pennadl", "displayName": "stefano di luca", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes I'm experiencing this problem too, toImage() doesn't render labels from SDK 3.3.0, the bug is still present in the new SDK 3.4.0", "updateAuthor": { "name": "pennadl", "key": "pennadl", "displayName": "stefano di luca", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T08:55:08.000+0000", "updated": "2014-09-19T08:55:08.000+0000" }, { "id": "328990", "author": { "name": "carlosfleck", "key": "carlosfleck", "displayName": "Carlos Fleck", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "This error also occurs to me, as it occurred from version 3.3.0, and it is only to be fixed in version 3.5 which is scheduled for 19 / Mar / 2015. \r\nWould not be possible to place with the release of 3.4.2?", "updateAuthor": { "name": "carlosfleck", "key": "carlosfleck", "displayName": "Carlos Fleck", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2014-10-22T13:04:37.000+0000", "updated": "2014-10-22T13:04:37.000+0000" }, { "id": "330618", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6302", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-03T22:30:25.000+0000", "updated": "2014-11-03T22:30:25.000+0000" }, { "id": "330640", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-04T03:55:53.000+0000", "updated": "2014-11-04T03:55:53.000+0000" }, { "id": "339357", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.6.0.v20150115142105\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1.1), iPad Air 2 (8.2b4)\r\n\r\nUsing the attached code built to both devices, the labels are laid out correctly each time, added more views and the labels stayed in the correct position.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-01-16T00:59:12.000+0000", "updated": "2015-01-16T00:59:12.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }