{"action":"created","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/2631","repository_url":"https://api.github.com/repos/pixijs/pixi.js","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2631/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2631/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2631/events","html_url":"https://github.com/pixijs/pixi.js/issues/2631","id":159099408,"number":2631,"title":"v4 wrong width/height behaviour of PIXI.Graphics and PIXI.Container","user":{"login":"rkrasky","id":1822894,"avatar_url":"https://avatars.githubusercontent.com/u/1822894?v=3","gravatar_id":"","url":"https://api.github.com/users/rkrasky","html_url":"https://github.com/rkrasky","followers_url":"https://api.github.com/users/rkrasky/followers","following_url":"https://api.github.com/users/rkrasky/following{/other_user}","gists_url":"https://api.github.com/users/rkrasky/gists{/gist_id}","starred_url":"https://api.github.com/users/rkrasky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkrasky/subscriptions","organizations_url":"https://api.github.com/users/rkrasky/orgs","repos_url":"https://api.github.com/users/rkrasky/repos","events_url":"https://api.github.com/users/rkrasky/events{/privacy}","received_events_url":"https://api.github.com/users/rkrasky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-06-08T07:44:04Z","updated_at":"2016-06-09T11:51:58Z","closed_at":null,"body":"```js\r\nvar renderer = new PIXI.WebGLRenderer(800, 600);\r\n\r\ndocument.body.appendChild(renderer.view);\r\n\r\nvar stage = new PIXI.Container();\r\n\r\nvar g = new PIXI.Graphics();\r\ng.beginFill(0xff00ff, 0.5);\r\ng.drawRect(0, 0, 100, 100);\r\ng.endFill();\r\nstage.addChild(g);\r\n\r\nsetInterval(function(){ g.width = 200; console.log(g.width); }, 1000);\r\n\r\nanimate();\r\n\r\nfunction animate() {\r\n    requestAnimationFrame(animate);\r\n\r\n    renderer.render(stage);\r\n}\r\n```\r\n\r\nExpected result: after one second the graphics object resizes to width 200 and is not resizing anymore\r\nActual result: the graphics object width jumping from 100 to 200 every second\r\n\r\n\r\nEdit: also PIXI.Container has problems with width and height:\r\n\r\n```js\r\nvar renderer = new PIXI.WebGLRenderer(800, 600);\r\n\r\ndocument.body.appendChild(renderer.view);\r\n\r\nvar stage = new PIXI.Container();\r\n\r\nPIXI.loader.add(\"test\", \"bunny.png\").load(function() {\r\n\r\n    var c = new PIXI.Container();\r\n    stage.addChild(c);\r\n\r\n    console.log(\"container w/h\", c.width, c.height); // correct (0,0)\r\n\r\n    bunny = PIXI.Sprite.fromImage(\"bunny.png\");\r\n\r\n    console.log(\"bunny w/h\", bunny.width, bunny.height); // correct\r\n\r\n    c.addChild(bunny);\r\n\r\n    console.log(\"container w/h\", c.width, c.height); // incorrect (0,0) should be the same size as bunny\r\n\r\n    setTimeout(function() {\r\n        console.log(\"container w/h\", c.width, c.height); // correct\r\n    }, 500);\r\n\r\n    animate();\r\n});\r\n\r\nfunction animate() {\r\n    requestAnimationFrame(animate);\r\n\r\n    renderer.render(stage);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments/224872882","html_url":"https://github.com/pixijs/pixi.js/issues/2631#issuecomment-224872882","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2631","id":224872882,"user":{"login":"whizzkid","id":323372,"avatar_url":"https://avatars.githubusercontent.com/u/323372?v=3","gravatar_id":"","url":"https://api.github.com/users/whizzkid","html_url":"https://github.com/whizzkid","followers_url":"https://api.github.com/users/whizzkid/followers","following_url":"https://api.github.com/users/whizzkid/following{/other_user}","gists_url":"https://api.github.com/users/whizzkid/gists{/gist_id}","starred_url":"https://api.github.com/users/whizzkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whizzkid/subscriptions","organizations_url":"https://api.github.com/users/whizzkid/orgs","repos_url":"https://api.github.com/users/whizzkid/repos","events_url":"https://api.github.com/users/whizzkid/events{/privacy}","received_events_url":"https://api.github.com/users/whizzkid/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T11:51:58Z","updated_at":"2016-06-09T11:51:58Z","body":"yeah i cancelled it, something's still wrong."}}
{"actor":{"display_login":"whizzkid"}}