{"action":"created","issue":{"url":"https://api.github.com/repos/kangax/fabric.js/issues/3409","repository_url":"https://api.github.com/repos/kangax/fabric.js","labels_url":"https://api.github.com/repos/kangax/fabric.js/issues/3409/labels{/name}","comments_url":"https://api.github.com/repos/kangax/fabric.js/issues/3409/comments","events_url":"https://api.github.com/repos/kangax/fabric.js/issues/3409/events","html_url":"https://github.com/kangax/fabric.js/issues/3409","id":188519349,"number":3409,"title":"Stretching centered object on X orY axis causes top/left values to become NaN","user":{"login":"danielbonnell","id":8513877,"avatar_url":"https://avatars.githubusercontent.com/u/8513877?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbonnell","html_url":"https://github.com/danielbonnell","followers_url":"https://api.github.com/users/danielbonnell/followers","following_url":"https://api.github.com/users/danielbonnell/following{/other_user}","gists_url":"https://api.github.com/users/danielbonnell/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbonnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbonnell/subscriptions","organizations_url":"https://api.github.com/users/danielbonnell/orgs","repos_url":"https://api.github.com/users/danielbonnell/repos","events_url":"https://api.github.com/users/danielbonnell/events{/privacy}","received_events_url":"https://api.github.com/users/danielbonnell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-10T14:17:33Z","updated_at":"2016-11-11T11:19:00Z","closed_at":"2016-11-11T11:19:00Z","body":"## Version\r\n1.6.6\r\n\r\n## Test Case\r\nhttps://jsfiddle.net/17p318wn/\r\n\r\n## Steps to reproduce\r\nAdd an object to the canvas center and then stretch it on either the X or Y axis. The bug seems to go away when I don't set `originX` and `originY` for the object and `canvas.selection === false`, however that prevents group selection, which is a critical feature. The bug seems to be related to group selection somehow.\r\n\r\n## Expected Behavior\r\nThe object should stretch as expected. The position should be unaffected. The object's `top` and `left` coordinates should remain unchanged.\r\n\r\n## Actual Behavior\r\nStretching a centered object on the X or Y axis causes the opposing coordinate value to become `NaN`. For example, stretching a `Rect` on the X axis causes `top === NaN` while stretching it on the Y axis causes `left === Nan`. As a result, the object appears to fly off the canvas to the top left corner where it remains unselectable even if `canvas.selection === true`. This behavior occurs with other object types such as `Circle` and `Textbox`. Note that stretching on both X an Y axis using a corner bounding box does not trigger this behavior.\r\n\r\nSee before/after screenshots:\r\n![1](https://cloud.githubusercontent.com/assets/8513877/20179974/7c5dfcc8-a726-11e6-94f3-2844e2d012bb.png)\r\n![2](https://cloud.githubusercontent.com/assets/8513877/20179973/7c5d049e-a726-11e6-849f-547fc81cbf12.png)\r\n"},"comment":{"url":"https://api.github.com/repos/kangax/fabric.js/issues/comments/259936853","html_url":"https://github.com/kangax/fabric.js/issues/3409#issuecomment-259936853","issue_url":"https://api.github.com/repos/kangax/fabric.js/issues/3409","id":259936853,"user":{"login":"asturur","id":1194048,"avatar_url":"https://avatars.githubusercontent.com/u/1194048?v=3","gravatar_id":"","url":"https://api.github.com/users/asturur","html_url":"https://github.com/asturur","followers_url":"https://api.github.com/users/asturur/followers","following_url":"https://api.github.com/users/asturur/following{/other_user}","gists_url":"https://api.github.com/users/asturur/gists{/gist_id}","starred_url":"https://api.github.com/users/asturur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asturur/subscriptions","organizations_url":"https://api.github.com/users/asturur/orgs","repos_url":"https://api.github.com/users/asturur/repos","events_url":"https://api.github.com/users/asturur/events{/privacy}","received_events_url":"https://api.github.com/users/asturur/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T11:19:00Z","updated_at":"2016-11-11T11:19:00Z","body":"ok i was tricked for a bit.\r\noriginX cannot take top, it needs left, right or center.\r\nsame apply for originY."}}
{"actor":{"display_login":"asturur"}}