{ "id": "98949", "key": "TIMOB-10371", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-18T04:07:57.000+0000", "created": "2012-08-09T11:08:59.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "layout", "parity" ], "versions": [], "issuelinks": [ { "id": "19798", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "64827", "key": "TIMOB-3749", "fields": { "summary": "iOS: ImageView with scaled image, auto leaves padding", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-06T18:05:32.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "As part of TIMOB-3749 scaling behavior of imageViews was changed. If either width or height of image view are set to follow SIZE behavior('auto',Ti.UI.SIZE,undefined) then the image is scaled with aspect ratio intact. Otherwise the image is scaled ignoring aspect ratio. Test code below\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'#fff',\r\n layout:'vertical'\r\n});\r\n \r\nvar image = Ti.UI.createImageView({ \r\n image: \"http://www.catravelservices.com/management/hotels/pictures/Mawamba_lodge_nature.jpg\", \r\n backgroundColor : \"red\" \r\n});\r\n \r\n \r\nvar label = Ti.UI.createLabel({\r\n text:'Results Here'\r\n})\r\n \r\nvar updateLabel = function(){\r\n var size = image.size;\r\n label.text = 'ImageView size is '+size.width+'x'+size.height;\r\n}\r\n \r\nvar controlsContainer = Ti.UI.createView({\r\n height:Ti.UI.SIZE\r\n})\r\n \r\nvar widthControls = Ti.UI.createView({\r\n width:'50%',\r\n layout:'vertical',\r\n left:0,\r\n height:Ti.UI.SIZE\r\n})\r\n \r\nvar heightControls = Ti.UI.createView({\r\n width:'50%',\r\n layout:'vertical',\r\n right:0,\r\n height:Ti.UI.SIZE\r\n})\r\n \r\ncontrolsContainer.add(widthControls);\r\ncontrolsContainer.add(heightControls);\r\n \r\nvar b1 = Ti.UI.createButton({title:'WIDTH=SIZE'})\r\nvar b2 = Ti.UI.createButton({title:'WIDTH=165'})\r\nvar b3 = Ti.UI.createButton({title:'WIDTH=250'})\r\nvar b4 = Ti.UI.createButton({title:'HEIGHT=SIZE'})\r\nvar b5 = Ti.UI.createButton({title:'HEIGHT=50'})\r\nvar b6 = Ti.UI.createButton({title:'HEIGHT=165'})\r\nb1.addEventListener('click',function(e){\r\n image.width=Ti.UI.SIZE;\r\n setTimeout(updateLabel,500);\r\n})\r\nb2.addEventListener('click',function(e){\r\n image.width=165;\r\n setTimeout(updateLabel,500);\r\n})\r\nb3.addEventListener('click',function(e){\r\n image.width=250;\r\n setTimeout(updateLabel,500);\r\n})\r\nb4.addEventListener('click',function(e){\r\n image.height=Ti.UI.SIZE;\r\n setTimeout(updateLabel,500);\r\n})\r\nb5.addEventListener('click',function(e){\r\n image.height=50;\r\n setTimeout(updateLabel,500);\r\n})\r\nb6.addEventListener('click',function(e){\r\n image.height=165;\r\n setTimeout(updateLabel,500);\r\n})\r\nwin.add(image);\r\nwidthControls.add(b1);\r\nwidthControls.add(b2);\r\nwidthControls.add(b3);\r\nheightControls.add(b4);\r\nheightControls.add(b5);\r\nheightControls.add(b6);\r\nwin.add(controlsContainer);\r\nwin.add(label)\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Blackberry: Imageview parity for scaling behavior", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "409322", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and the fact that we no longer offer support for BlackBerry.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-06T18:05:32.000+0000", "updated": "2017-03-06T18:05:32.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }