{"action":"created","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/2599","repository_url":"https://api.github.com/repos/pixijs/pixi.js","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2599/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2599/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2599/events","html_url":"https://github.com/pixijs/pixi.js/issues/2599","id":156515809,"number":2599,"title":"getBounds returns wrong values","user":{"login":"mathieuanthoine","id":6437496,"avatar_url":"https://avatars.githubusercontent.com/u/6437496?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieuanthoine","html_url":"https://github.com/mathieuanthoine","followers_url":"https://api.github.com/users/mathieuanthoine/followers","following_url":"https://api.github.com/users/mathieuanthoine/following{/other_user}","gists_url":"https://api.github.com/users/mathieuanthoine/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieuanthoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieuanthoine/subscriptions","organizations_url":"https://api.github.com/users/mathieuanthoine/orgs","repos_url":"https://api.github.com/users/mathieuanthoine/repos","events_url":"https://api.github.com/users/mathieuanthoine/events{/privacy}","received_events_url":"https://api.github.com/users/mathieuanthoine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-24T14:02:03Z","updated_at":"2016-05-24T14:28:00Z","closed_at":"2016-05-24T14:06:14Z","body":"In getBounds, there a test on _currentBounds to avoid recalculation but if getLocalBounds is called just before getBounds, the _currentBounds matrix is changed to the local Matrix resulting in wrong value for getBounds\r\n\r\nFor example I ask for the height of an Object (calling getLocalBounds). If I call getBounds just after asking the height and before render, getBounds return a wrong value"},"comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments/221288662","html_url":"https://github.com/pixijs/pixi.js/issues/2599#issuecomment-221288662","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2599","id":221288662,"user":{"login":"mathieuanthoine","id":6437496,"avatar_url":"https://avatars.githubusercontent.com/u/6437496?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieuanthoine","html_url":"https://github.com/mathieuanthoine","followers_url":"https://api.github.com/users/mathieuanthoine/followers","following_url":"https://api.github.com/users/mathieuanthoine/following{/other_user}","gists_url":"https://api.github.com/users/mathieuanthoine/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieuanthoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieuanthoine/subscriptions","organizations_url":"https://api.github.com/users/mathieuanthoine/orgs","repos_url":"https://api.github.com/users/mathieuanthoine/repos","events_url":"https://api.github.com/users/mathieuanthoine/events{/privacy}","received_events_url":"https://api.github.com/users/mathieuanthoine/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T14:28:00Z","updated_at":"2016-05-24T14:28:00Z","body":"`Container.prototype.getLocalBounds = function ()\r\n{\r\n\tvar matrixCache = this.worldTransform;\r\n    this.worldTransform = PIXI.Matrix.IDENTITY;\r\n    for (var i = 0, j = this.children.length; i < j; ++i) this.children[i].updateTransform();\r\n    this.worldTransform = matrixCache;\r\n    this._currentBounds = null;\r\n   var lBounds=this.getBounds( PIXI.Matrix.IDENTITY );\r\n   this._currentBounds = null;\r\n   return lBounds;\r\n};`\r\n\r\nThis is a proposal to fix the bug"}}
{"actor":{"display_login":"mathieuanthoine"}}