{ "id": "142224", "key": "TIMOB-18306", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": [], "resolution": null, "resolutiondate": null, "created": "2015-01-05T15:56:42.000+0000", "priority": null, "labels": [ "images", "orientation" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:51.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "The image selection algorithm in {{TiUTils.m}} under [{{checkFor2XImage()}}|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUtils.m#L667] is missing selection by orientation and should fallback to other 16:9 screens before using the 3:4 defaults.\r\n\r\nh1. Current algorithm\r\n\r\n*os* = ~ipad|~iphone\r\n \r\n* if isRetinaHDDisplay\r\n\t** image-736h@3x\r\n\t** image@3x\r\n* if isRetinaDisplay\r\n\t** if isRetinaiPhone6\r\n\t\t*** image-667h@2x\r\n\t** *elseif* isRetinaFourInch\r\n\t\t*** image-568h@2x\r\n\t** image@2x\\[os\\]\r\n\t** image@2x\r\n* image\\[os\\]\r\n* image\r\n\r\nh1. Better algorithm\r\n\r\n*orientation* = Landscape|Portrait\r\n \r\n* if isRetinaHDDisplay\r\n\t** image-\\[orientation\\]-736h@3x\r\n\t** image-736h@3x\r\n\t** image@3x\r\n* if isRetinaDisplay\r\n\t** if isRetinaHDDisplay *or isRetinaiPhone6*\r\n\t\t*** image-\\[orientation\\]-667h@2x\r\n\t\t*** image-667h@2x\r\n\t** *if* isRetinaFourInch *or isRetinaHDDisplay or isRetinaiPhone6*\r\n\t\t*** image-\\[orientation\\]-568h@2x\r\n\t\t*** image-568h@2x\r\n\t** image-\\[orientation\\]@2x[os\\]\r\n\t** image@2x\\[os\\]\r\n\t** image-\\[orientation\\]@2x\r\n\t** image@2x\r\n* image-\\[orientation\\]\\[os\\]\r\n* image\\[os\\]\r\n* image-\\[orientation\\]\r\n* image", "attachment": [], "flagged": false, "summary": "Better algorithm for iOS image selection", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "master", "comment": { "comments": [ { "id": "337808", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I can do a PR if you agree with the logic.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-01-05T16:01:55.000+0000", "updated": "2015-01-05T16:01:55.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }