{ "id": "106027", "key": "TIMOB-11970", "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": "14700", "description": "2012 Sprint 25", "name": "2012 Sprint 25", "archived": true, "released": true, "releaseDate": "2012-12-17" }, { "id": "14784", "description": "2012 Sprint 25 API", "name": "2012 Sprint 25 API", "archived": true, "released": true, "releaseDate": "2012-12-17" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-12-06T20:55:04.000+0000", "created": "2012-12-05T21:52:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:06.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. Problem description\r\nZoomable images are not correctly displayed on latest 3.x CI\r\n\r\nh3. Description \r\nCustomer would like to replicate the zoomable image similar to the ios photos application, using 'zoomScale' properties for the containing scrollView.\r\n\r\nThe image should be centered and allow for zooming in. It works fine on 2.1.4 GA but on latest CI the image is cropped and not fully visible, also when zooming in.\r\n\r\nAttaching screenshots.\r\n\r\nSample code:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n maxZoomScale: 4.0,\r\n minZoomScale:1.0,\r\n zoomScale:1.0,\r\n});\r\nvar imageView = Ti.UI.createImageView({\r\n backgroundColor: 'pink',\r\n width:'100%',\r\n height:'100%',\r\n image: 'http://www.naturewalls.org/wp-content/uploads/2010/06/mirror_lake_in_the_mountains_wallpaper.jpg'\r\n});\r\n\r\nscrollView.add(imageView);\r\nwin1.add(scrollView);\r\n\r\nwin1.open();\r\n{code}", "attachment": [ { "id": "33964", "filename": "2.1.4GA_zoomed.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T21:52:55.000+0000", "size": 161374, "mimeType": "image/png" }, { "id": "33963", "filename": "2.1.4GA.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T21:52:55.000+0000", "size": 185081, "mimeType": "image/png" }, { "id": "33961", "filename": "3.x_zoomed.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T21:52:55.000+0000", "size": 238319, "mimeType": "image/png" }, { "id": "33962", "filename": "3.x.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T21:52:55.000+0000", "size": 439534, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: display issues with zoomable image on 3.x", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS tested on 5.1 and 6\r\nTiSDK latest CI 3.x (not reproducible on 2.1.4 GA)", "comment": { "comments": [ { "id": "230278", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The imageView behavior on IOS was changed as part of TIMOB-3749. The image is not cropped. It is scaling to fit the given dimensions (100%x100%). \nTO replicate old behavior use the following code\n\n{code}\nvar win1 = Titanium.UI.createWindow({ \n backgroundColor:'#fff'\n});\n \nvar scrollView = Ti.UI.createScrollView({\n maxZoomScale: 4.0,\n minZoomScale:0.1,\n zoomScale:1.0,\n});\n\nvar wrapper = Ti.UI.createView({\n\twidth:'100%',\n\theight:'100%',\n\tbackgroundColor:'pink'\n})\nvar imageView = Ti.UI.createImageView({\n image: 'http://www.naturewalls.org/wp-content/uploads/2010/06/mirror_lake_in_the_mountains_wallpaper.jpg'\n});\n\nwrapper.add(imageView);\n \nscrollView.add(wrapper);\n\nvar b1 = Ti.UI.createButton({title:' + ', top:0, left:0, width:100})\nvar b2 = Ti.UI.createButton({title:' - ', top:0, right:0, width:100})\n\n\nwin1.add(scrollView);\nwin1.add(b1);\nwin1.add(b2);\n\nb1.addEventListener('click',function(){\n\tvar zoom = scrollView.zoomScale;\n\tzoom += 0.1;\n\tscrollView.setZoomScale(zoom);\n}) \nb2.addEventListener('click',function(){\n\tvar zoom = scrollView.zoomScale;\n\tzoom -= 0.1;\n\tscrollView.setZoomScale(zoom);\n}) \nwin1.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T20:52:53.000+0000", "updated": "2012-12-06T20:52:53.000+0000" }, { "id": "230279", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Not a bug. Have provided code to replicate 2.1.X behavior ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T20:55:04.000+0000", "updated": "2012-12-06T20:55:04.000+0000" }, { "id": "240632", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing based on comments above", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T22:48:33.000+0000", "updated": "2013-03-04T22:48:33.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }