{"action":"opened","issue":{"url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/5336","repository_url":"https://api.github.com/repos/BabylonJS/Babylon.js","labels_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/5336/labels{/name}","comments_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/5336/comments","events_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/5336/events","html_url":"https://github.com/BabylonJS/Babylon.js/issues/5336","id":368384506,"node_id":"MDU6SXNzdWUzNjgzODQ1MDY=","number":5336,"title":"add a fixed ratio option to GUI image/buttons","user":{"login":"Nodragem","id":10520249,"node_id":"MDQ6VXNlcjEwNTIwMjQ5","avatar_url":"https://avatars3.githubusercontent.com/u/10520249?v=4","gravatar_id":"","url":"https://api.github.com/users/Nodragem","html_url":"https://github.com/Nodragem","followers_url":"https://api.github.com/users/Nodragem/followers","following_url":"https://api.github.com/users/Nodragem/following{/other_user}","gists_url":"https://api.github.com/users/Nodragem/gists{/gist_id}","starred_url":"https://api.github.com/users/Nodragem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nodragem/subscriptions","organizations_url":"https://api.github.com/users/Nodragem/orgs","repos_url":"https://api.github.com/users/Nodragem/repos","events_url":"https://api.github.com/users/Nodragem/events{/privacy}","received_events_url":"https://api.github.com/users/Nodragem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T20:32:02Z","updated_at":"2018-10-09T20:32:02Z","closed_at":null,"author_association":"NONE","body":"I would like to never use pixels to size my buttons/images. \r\nUsing proportion sounds much better as everything resizes based on the device screen size. \r\n\r\nHowever, currently, if the container of a button/image has a width greater than its height, then if you set \"button.height=0.2; button.width=0.2\", the button will appear elliptic and squashed on Y-axis. Indeed the button will follow the proportion of the container!\r\n\r\n# Feature request\r\nMy feature request is to add an option \"controller.fixedRatio = 1\", so that when you set \"button.height=0.2\", the width is computed automatically so that the button keeps its original ratio.\r\n\r\nIn practice, control.fixedRatio could be set to any number and is defined as Horizontal/Vertical, e.g. 16/9, 4/3, etc. A control.fixedRatio = 0 would free the ratio. When width and height are both defined by the user, the last to be defined wins.\r\n\r\n\r\n\r\n- Link to [forum](http://www.html5gamedevs.com/forum/16-babylonjs/) discussion about the feature:\r\n- Feature description\r\n- Additional links that could help implementing the feature:\r\n\r\n\r\n"}}
{"actor":{"display_login":"Nodragem"}}