{ "id": "123071", "key": "TIMOB-15855", "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": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "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-03-18T23:27:33.000+0000", "created": "2013-12-02T13:03:08.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "View", "qe-closed-3.2.3", "qe-testadded", "supportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "36376", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "128549", "key": "TIMOB-16793", "fields": { "summary": "iOS: Window: backgroundGradient on window hides the text", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-03T17:22:47.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": "h3. Description\r\n\r\nWhen assigning a dynamic zIndex value to a view from a touchend event the value is assigned but not always get displayed on iPad.\r\n\r\nh3. Steps to reproduce\r\n\r\nRun the code on ipad and do a fast horizontal scrolling to move the views around, randomly the views will start not showing the zindex that was setted.\r\n\r\nh3. Test Case\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar w = Ti.UI.createWindow({orientationModes : [\r\n\t Titanium.UI.LANDSCAPE_LEFT,\r\n\t Titanium.UI.LANDSCAPE_RIGHT\r\n\t],\r\n});\r\n\r\nvar card=[];\r\nvar centrePosition = (512);\r\nvar cardSize = 150;\r\nvar distance;\r\nvar touchX; \r\n\r\nvar colors=['red','blue','yellow','orange','purple','white','gray'];\r\nvar position = [(centrePosition-300),(centrePosition-200),(centrePosition-100),(centrePosition),(centrePosition+100),(centrePosition+200),(centrePosition+300)];\r\n\r\nfor (var i=0;i<=6;i++){\r\n\tcard[i]=Ti.UI.createView({\r\n\t\twidth:150,\r\n\t\theight:100,\r\n\t\tbackgroundColor:colors[i],\r\n\t\tleft:position[i]\r\n\t});\t\r\n\tw.add(card[i]);\r\n}\r\n\r\nvar lbl = Ti.UI.createLabel({\r\n\tcolor:'white',\r\n\ttop:100\r\n});\r\n\r\nw.add(lbl);\r\n\r\nfunction arrangeZIndex(){\r\n for (var i=0; i<=6; i++) { \r\n var distanceFromCentre = (card[i].left - centrePosition) + (cardSize/2);\r\n card[i].zIndex = Math.round(100 - (Math.sqrt(distanceFromCentre*distanceFromCentre)/100));\r\n Ti.API.info(\"card \"+(i)+\" zindex:\"+card[i].zIndex);\r\n } \r\n lbl.text = \"card red zindex:\"+card[0].zIndex+\" card blue zindex:\"+card[1].zIndex+\" card yellow zindex:\"+card[2].zIndex+\"card orange zindex:\"+card[3].zIndex+\" card purple zindex:\"+card[4].zIndex+\" card white zindex:\"+card[5].zIndex+\" card gray zindex:\"+card[6].zIndex;\r\n}\r\n\r\nfunction fingerDown(e) {\r\n\ttouchX = e.x;\r\n}\r\n \r\nfunction moveCards(e) {\r\n var distance = 0;\r\n if(touchX != e.x){\r\n distance = e.x - touchX;\r\n touchX = e.x; \r\n }\r\n\tfor (var i=0; i<=6; i++) {\r\n\t card[i].left += distance;\r\n\t}\r\n}\r\n\r\nw.addEventListener('touchstart', fingerDown); \r\nw.addEventListener('touchmove', moveCards);\r\nw.addEventListener('touchend', arrangeZIndex);\r\n\r\narrangeZIndex();\r\nw.open();\r\n{code} \r\n\r\n\r\nh3. Console log\r\n\r\n{code}\r\n\r\n[INFO] : card red zindex:95\r\n[INFO] : card blue zindex:96\r\n[INFO] : card yellow zindex:97\r\n[INFO] : card orange zindex:98\r\n[INFO] : card purple zindex:99\r\n[INFO] : card white zindex:100\r\n[INFO] : card gray zindex:99\r\n\r\n{code}\r\n\r\nAs you can see in the attachment even when the white view has a zindex value of 100 the gray view with a 99 zindex value is shown on top.", "attachment": [ { "id": "44284", "filename": "zindex.png", "author": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-02T13:03:08.000+0000", "size": 70118, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: dynamic zIndex value not being applied correctly", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Product: Titanium SDK\r\nTitanium SDK: Mobile 3.1GA,3.2.0.GA\r\nPlatform OS: iOS\r\nPlatform OS Version: 7", "comment": { "comments": [ { "id": "295834", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending \r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/5443\r\n3_2_X - https://github.com/appcelerator/titanium_mobile/pull/5457", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-05T23:31:06.000+0000", "updated": "2014-03-11T18:12:32.000+0000" }, { "id": "297931", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified the fix with:\nMac osx 10.9.2 Mavericks\nAppcelerator Studio, build: 3.2.3.201403181115\nTitanium SDK, build: 3.2.3.v20140318131613\nNode.JS Version: v0.10.13\nNPM Version: 1.3.2\n├── acs@1.0.14\n├── alloy@1.3.1\n├── npm@1.3.2\n├── titanium@3.2.1\n└── titanium-code-processor@1.1.0\nDevice: iPad Air iOS 7.0.3\n\nZindex value is being applied correctly ", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-19T18:31:15.000+0000", "updated": "2014-03-19T18:31:15.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }