{"action":"closed","issue":{"url":"https://api.github.com/repos/kangax/fabric.js/issues/3517","repository_url":"https://api.github.com/repos/kangax/fabric.js","labels_url":"https://api.github.com/repos/kangax/fabric.js/issues/3517/labels{/name}","comments_url":"https://api.github.com/repos/kangax/fabric.js/issues/3517/comments","events_url":"https://api.github.com/repos/kangax/fabric.js/issues/3517/events","html_url":"https://github.com/kangax/fabric.js/issues/3517","id":194720219,"number":3517,"title":"[BUG] Vertical & horizontal lines in a group are exactly half the length they should be","user":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-09T23:15:46Z","updated_at":"2016-12-11T10:25:46Z","closed_at":"2016-12-11T10:25:46Z","body":"<!--\r\nThank you for contributing!\r\n\r\nHave a usage question?\r\n======================\r\nThe issue tracker is only for bugs (with reproducible minimal test case) and feature requests, so please do the following if you have a question:\r\n\r\n- Read the tutorial: http://fabricjs.com/articles/\r\n- Read the docs: http://fabricjs.com/docs/\r\n- Explore demos: http://fabricjs.com/demos/\r\n- Look for/ask questions on StackOverflow: http://stackoverflow.com/questions/tagged/fabricjs\r\n- Ask on Google Group: https://groups.google.com/forum/#!forum/fabricjs\r\n\r\n\r\nThink you found a bug?\r\n======================\r\nThe best bug report is a failing test in the repository as a pull request. Otherwise, please use the \"BUG REPORT\" template below.\r\n\r\n\r\nHave a feature request?\r\n=======================\r\nRemove the template from below and provide thoughtful commentary *and code samples* on what this feature means for your product. What will it allow you to do that you can't do today? How will it make current work-arounds straightforward? What potential bugs and edge cases does it help to avoid? etc.\r\n-->\r\n\r\n<!-- BUG TEMPLATE -->\r\n## Version\r\n1.7.1\r\n\r\n## Test Case\r\nhttp://codepen.io/tmrczk/pen/XNBaMy\r\n\r\n## Steps to reproduce\r\nUse any browser.\r\n\r\n## Expected Behavior\r\nRed vertical and horizontal lines should stretch the entire gray area (which is the canvas background color).\r\n\r\n## Actual Behavior\r\nRed vertical and horizontal lines are exactly half of the length - **450**px instead of **900**px and **581**px instead of **1162**px.\r\n\r\nThe blue line that's outside of the group has correct height.\r\n\r\nVersion 1.6.5 used to render the red grid correctly.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3987203/21067641/a1026d40-be3a-11e6-9815-c66948ceaeb1.png)\r\n\r\n```js\r\nvar gridWidth = 900;\r\nvar gridHeight = 1162;\r\n\r\nvar canvas  = new fabric.Canvas('c', {\r\n  backgroundColor: \"#cccccc\",\r\n  width: gridWidth,\r\n  height: gridHeight\r\n});\r\n\r\nvar gridSizePX = 100;\r\nvar pageGrid = new fabric.Group([], {left: 0, top: 0, width: gridWidth, height: gridHeight, originX: 'center', originY: 'center', evented: false, selectable: false});\r\n\r\nvar lineOption = {stroke: 'rgb(255,0,0)', strokeWidth: 1, selectable: false, evented: false, strokeDashArray: null};\r\n// first loop for vertical line\r\nfor (var i = Math.ceil(gridWidth / gridSizePX); i--;) {\r\n  pageGrid.add(new fabric.Line([gridSizePX * i, 0, gridSizePX * i, gridHeight], lineOption));\r\n}\r\nfor (var i = Math.ceil(gridHeight / gridSizePX); i--;) {\r\n  pageGrid.add(new fabric.Line([0, gridSizePX * i, gridWidth, gridSizePX * i], lineOption));\r\n}\r\ncanvas.add(pageGrid);\r\n\r\n\r\nvar lineOption2 = {stroke: 'rgb(0,0,255)', strokeWidth: 3, selectable: false, evented: false, strokeDashArray: null};\r\nvar line = new fabric.Line([720, 0, 720, gridHeight], lineOption2);\r\ncanvas.add(line);\r\n```\r\n\r\nThanks!"}}
{"actor":{"display_login":"asturur"}}