{ "id": "86257", "key": "TIMOB-8473", "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-04-04T04:26:47.000+0000", "created": "2012-02-09T02:01:07.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T21:12: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": "h6.Issue\r\nWhen you pinch & zoom the image, the scale value prints correctly after the scale event, but if you then double tap the image, it does not use that new scale value we just zoomed to, but the old scale value that was there just before the pinch event.\r\n\r\nh6.Reproduction steps\r\n1. Run code below\r\n2. Pinch & zoom the image\r\n3. Double tap\r\n4. Noticed at the console it does not use that new scale value we just zoomed to, but the old scale value that was there just before the pinch event.\r\n\r\nh6.Tested on\r\niOS simulator 5\r\n\r\nh6.Repro sequence\r\n{code}\r\n\r\nTitanium.UI.setBackgroundColor('#fff');\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\n\r\nvar image = 'wallpaper.jpg';\r\n\r\nvar ratio = 1.0;\r\n\r\nvar imageScrollView = Ti.UI.createScrollView({\r\n\tmaxZoomScale:4.0,\r\n\tminZoomScale:1.0,\r\n\ttop:0,\r\n\twidth:320,\r\n\theight:480,\r\n\tshowVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:true,\r\n contentWidth: image.width,\r\n\tcontentHeight: image.height,\r\n\tzoomScale:ratio\r\n});\r\n\r\nvar imageView = Ti.UI.createImageView({\r\n\timage:image,\r\n\twidth:320,\r\n\theight:480\r\n});\r\n\r\nimageScrollView.add(imageView);\r\n\r\nimageView.addEventListener('doubletap', function(e) {\r\n\t\r\n\tTi.API.info('doubletap detected.');\r\n\tTi.API.info('zoomScale is ' + imageScrollView.zoomScale);\r\n\t\r\n\tif (imageScrollView.zoomScale < 4.0) {\r\n\t\timageScrollView.zoomScale *= 2.0;\r\n\t}\r\n\t\r\n\telse {\r\n\t\timageScrollView.zoomScale = ratio;\r\n\t}\r\n\t\r\n});\r\n\r\nimageScrollView.addEventListener('scale', function(e) {\r\n\tTi.API.info('new imageScrollView zoomScale is ' + e.scale);\r\n});\r\n\r\nwin.add(imageScrollView);\r\n\r\nwin.open();\r\n{code}\r\n\r\nh6.Here is an example from the console:\r\n{noformat}\r\n[INFO] Application started\r\n[INFO] ScrollView-zoomScale/1.0 (1.8.0.1.fbdc96f)\r\n[INFO] new imageScrollView zoomScale is 1\r\n[INFO] new imageScrollView zoomScale is 2.464661121368408\r\n[INFO] doubletap detected.\r\n[INFO] zoomScale is 1\r\n[INFO] new imageScrollView zoomScale is 2\r\n{noformat}", "attachment": [ { "id": "25685", "filename": "ScrollView-zoomScale.zip", "author": { "name": "rogmabi", "key": "rogmabi", "displayName": "Roger Mabillard", "active": true, "timeZone": "America/Montreal" }, "created": "2012-02-09T02:01:07.000+0000", "size": 2635885, "mimeType": "application/zip" }, { "id": "26760", "filename": "wallpaper.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-31T22:14:16.000+0000", "size": 340441, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: Pinch event doesn't update correctly the zoomScale property of the ScrollView", "creator": { "name": "rogmabi", "key": "rogmabi", "displayName": "Roger Mabillard", "active": true, "timeZone": "America/Montreal" }, "subtasks": [], "reporter": { "name": "rogmabi", "key": "rogmabi", "displayName": "Roger Mabillard", "active": true, "timeZone": "America/Montreal" }, "environment": "Mac OS 10.7.3\r\niOS 5.0.1\r\nTitanium SDK 1.8.0.1, 1.8.1, 1.8.2, 2.0", "comment": { "comments": [ { "id": "245653", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces \r\n\r\nTested with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 \r\nTitanium SDK version: 3.0.2 \r\niOS iPhone Simulator: iOS SDK version: 6.0\r\n\r\n\r\nconsole:\r\n[INFO] : \b\b \b new imageScrollView zoomScale is 1\r\n[INFO] : \b\b \b new imageScrollView zoomScale is 1.0424460172653198\r\n[INFO] : \b\b \b doubletap detected.\r\n[INFO] : \b\b \b zoomScale is 1.0424460172653198\r\n[INFO] : \b\b \b new imageScrollView zoomScale is 2.0848920345306396\r\n[INFO] : \b\b \b new imageScrollView zoomScale is 2.5215344429016113\r\n[INFO] : \b\b \b doubletap detected.\r\n[INFO] : \b\b \b zoomScale is 2.5215344429016113\r\n[INFO] : \b\b \b new imageScrollView zoomScale is 4\t\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T04:26:47.000+0000", "updated": "2013-04-04T04:26:47.000+0000" }, { "id": "415377", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can verify this ticket as \"Cannot Reproduce\". Tested with the following environment;\r\niPhone 7 and Simulator (10.2)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.3 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T21:12:47.000+0000", "updated": "2017-03-23T21:12:47.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }