{ "id": "99071", "key": "TIMOB-10429", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15276", "description": "2013 Sprint 05 Core", "name": "2013 Sprint 05 Core", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-06T23:19:18.000+0000", "created": "2012-08-13T08:56:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "insight", "module_animation", "parity", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "27760", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "111572", "key": "TIMOB-13220", "fields": { "summary": "Android: Can not set width on label and ellipsize no longer works", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-16T12:09:44.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "In a view there is a label whose string size is more than the view size,the label is animated to left. There is a slag to display the right side of the label. It is only displayed when the animation is over. Its getting chopped off.\r\n\r\nSample app.js:\r\n{code}\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar view = Ti.UI.createView({\r\n\twidth:'90%',\r\n});\r\nvar label = Titanium.UI.createLabel({\r\n\tbackgroundColor:'red',\r\n\tcolor:'#999',\r\n\ttext:'This is a paragraph. This is a paragraph. This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.',\r\n\twordWrap:false,\r\n});\r\n\r\nvar animation = Titanium.UI.createAnimation({\r\n\tleft:-100,\r\n duration:5000\r\n}); \r\nanimation.addEventListener('complete',function() { \r\n\tanimation.left = 0;\r\n\tlabel.animate(animation); });\r\nlabel.animate(animation);\r\nview.add(label);\r\nwin.add(view);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nSteps to Reproduce:\r\n1.Launch the app.\r\n2.Notice the label getting chopped off to the right end.\r\n3.It will displayed at the end of the animation.\r\n\r\nPlease find the four screenshots attached in series.", "attachment": [ { "id": "30452", "filename": "AnimateLabelBug.png", "author": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-13T08:56:52.000+0000", "size": 5128, "mimeType": "image/png" }, { "id": "30468", "filename": "first.png", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T17:51:53.000+0000", "size": 26907, "mimeType": "image/png" }, { "id": "30471", "filename": "fourth.png", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T17:51:53.000+0000", "size": 18599, "mimeType": "image/png" }, { "id": "30469", "filename": "second.png", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T17:51:53.000+0000", "size": 27368, "mimeType": "image/png" }, { "id": "30470", "filename": "third.png", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T17:51:53.000+0000", "size": 18435, "mimeType": "image/png" }, { "id": "30457", "filename": "wordWrapFalse.png", "author": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-13T14:23:03.000+0000", "size": 10693, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Animate doesn't redraw label when width is larger than parent window", "creator": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "environment": "Ti SDK 2.1.1GA, Ti SDK 2.2.0 CI (3rd August), Ti SDK 2.1.0GA", "comment": { "comments": [ { "id": "214085", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It exhibits this behavior because the wordWrap is explicitly set as false. It works fine if the wordWrap property is set as 'true'. However, wordWrap is by default set as true. In fact it is exhibiting the correct behavior. Please find the attached code.\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar view = Ti.UI.createView({\r\n\twidth:'90%',\r\n});\r\nvar label = Titanium.UI.createLabel({\r\n\tbackgroundColor:'red',\r\n\tcolor:'#999',\r\n\ttext:'This is a paragraph. This is a paragraph. This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.',\r\n\twordWrap:true,//this is what you want it to be false. It works if its true and exhibits correct behavior if it false as well.\r\n});\r\nlabel.animate({\r\n\tleft:100,\r\n\tduration:500\r\n})\r\nview.add(label);\r\nwin.add(view);\r\n\r\nwin.open();\r\n\r\n{code}", "updateAuthor": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T11:40:55.000+0000", "updated": "2012-08-13T11:40:55.000+0000" }, { "id": "214150", "author": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "body": "Ahh, because I'm trying to create a ticker/marquee style component I had the duration set to a high number (so it went along slowly) and going left (negative left value).\r\nThe redraw doesn't happen until the end of the animation which isn't really a good user experience. I could use a setInterval method to move it left but that kind of defeats the purpose of having an animate function!\r\n\r\nYou can see what I mean by changing the animate code to the following:\r\n{code:javascript}\r\nlabel.animate({\r\n\t left:-100,\r\n\t duration:3000\r\n\t})\r\n{code}", "updateAuthor": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-13T13:25:55.000+0000", "updated": "2012-08-13T13:25:55.000+0000" }, { "id": "214161", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sam,\r\n\r\nCould you please try this code.\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar view = Ti.UI.createView({\r\n\twidth:'90%',\r\n});\r\nvar label = Titanium.UI.createLabel({\r\n\tbackgroundColor:'red',\r\n\tcolor:'#999',\r\n\ttext:'This is a paragraph. This is a paragraph. This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.',\r\n\twordWrap:true,//this is what you want it to be false. It works if its true and exhibits correct behavior if it false as well.\r\n});\r\n// label.animate({\r\n\t// left:-50,\r\n // duration:3000\r\n// })\r\nvar animation = Titanium.UI.createAnimation({\r\n\tleft:-100,\r\n duration:3000\r\n}); \r\nanimation.addEventListener('complete',function() { \r\n\tanimation.left = 0;\r\n\tlabel.animate(animation); });\r\nlabel.animate(animation);\r\nview.add(label);\r\nwin.add(view);\r\n\r\nwin.open();\r\n{code}\r\n\r\nLet me know how it goes.", "updateAuthor": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T14:08:25.000+0000", "updated": "2012-08-13T14:08:25.000+0000" }, { "id": "214170", "author": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "body": "Okay so I guess with wordWrap set to true that makes sense. (as the width of the label is just the width of the view). \r\nHowever if wordWrap is set to false then the width of the label is more than the width of the view. This means when you move it left it should obviously show the rest of the content. It doesn't do this until the end of the animation.\r\n\r\nI've attached an image to try and demonstrate what I mean. ", "updateAuthor": { "name": "scleaver", "key": "scleaver", "displayName": "Sam Cleaver", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-13T14:23:50.000+0000", "updated": "2012-08-13T14:23:50.000+0000" }, { "id": "239948", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3911", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-27T02:41:43.000+0000", "updated": "2013-02-27T02:41:43.000+0000" }, { "id": "241733", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTitanium SDK: 3.1.0.v20130311192922\r\nTitanium  Studio:3.0.2.201302151605\r\nDevice: Samsung GALAXY Note (2.3.6) ", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-12T11:37:59.000+0000", "updated": "2013-03-12T11:37:59.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }