{ "id": "63140", "key": "TIMOB-2508", "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": "11240", "name": "Release 1.6.0 M07", "archived": true, "released": true, "releaseDate": "2011-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:18.000+0000", "created": "2011-04-15T03:21:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "iphone", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:18.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}
The following animation technique is broken in the current 1.5\ncontinuous builds. Verified on iOS. \nCommunity question Attached movie showing behavior:
\n\nTitanium.UI.setBackgroundColor('#000');\n\nvar win = Titanium.UI.createWindow({ \n title:'Window',\n backgroundColor:'#fff',\n backButtonName:'Back'\n});\n\nvar imageView=Ti.UI.createImageView({\n image:'default_app_logo.png',\n zIndex:1\n});\n\nvar moveImageOneSecButton=Ti.UI.createButton({\n title:'Move: Duration 1 Sec',\n top: 10,\n width:200,\n height:40,\n zIndex:2\n});\n\nmoveImageOneSecButton.addEventListener('click', function(){\n var newX=imageView.center.x + 10;\n var newY=imageView.center.y + 10;\n imageView.animate({\n center: {\n x: newX,\n y: newY\n },\n duration: 1000\n });\n imageView.center.x=newX;\n imageView.center.y=newY;\n});\n\nvar moveImageOneMilliButton=Ti.UI.createButton({\n title:'Move: Duration 1 millisec',\n top: 60,\n width:200,\n height:40,\n zIndex:2\n});\n\nmoveImageOneMilliButton.addEventListener('click', function(){\n var newX=imageView.center.x + 10;\n var newY=imageView.center.y + 10;\n imageView.animate({\n center: {\n x: newX,\n y: newY\n },\n duration: 1\n });\n\n});\n\nvar resetImageButton=Ti.UI.createButton({\n title:'Reset Image',\n top: 110,\n width:200,\n height:40,\n zIndex:2\n});\n\nresetImageButton.addEventListener('click', function(){\n var newX=win.center.x;\n var newY=win.center.y;\n imageView.animate({\n center: {\n x: newX,\n y: newY\n },\n duration: 1\n });\n\n});\n\nwin.add(imageView);\nwin.add(moveImageOneSecButton);\nwin.add(moveImageOneMilliButton);\nwin.add(resetImageButton);\n\nwin.open();
\n
Code is being checked in, but part of the issue is that the\ncurrent iphone spec ignores x and y when width or height\nis missing. The animation was still using x and y, against the\nspec, and the layout was honoring the spec, setting things\nfullscreen.
\nShort version: After the code checkin, the animation will work,\nbut you MUST specify a width and height to the view, even if it's\n'auto' or a percentage.
(from [83683409c6e93e0977241a2fb5ca9229220ed902])\n[#2508 state:fixed-in-qa] Center is properly\nstored into the proxy's layoutProperties, which makes animation\ncorrect \nhttps://github.com/appcelerator/titanium_mobile/commit/83683409c6e9...
Mobile SDK version: 1.6.0 (01/25/11 13:33 1f1dd51...)
\nDevice/Version: iPhone 4 / 4.2.1
\nSimulator Version: 4.2 (235)
\nEmulator SDK: APIs 2.1