{"action":"created","issue":{"url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/4","labels_url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/4/comments","events_url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/4/events","html_url":"https://github.com/johnwalley/pub-tube-map/issues/4","id":121913928,"number":4,"title":"Break long pub names into multiple lines","user":{"login":"johnwalley","id":981531,"avatar_url":"https://avatars.githubusercontent.com/u/981531?v=3","gravatar_id":"","url":"https://api.github.com/users/johnwalley","html_url":"https://github.com/johnwalley","followers_url":"https://api.github.com/users/johnwalley/followers","following_url":"https://api.github.com/users/johnwalley/following{/other_user}","gists_url":"https://api.github.com/users/johnwalley/gists{/gist_id}","starred_url":"https://api.github.com/users/johnwalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnwalley/subscriptions","organizations_url":"https://api.github.com/users/johnwalley/orgs","repos_url":"https://api.github.com/users/johnwalley/repos","events_url":"https://api.github.com/users/johnwalley/events{/privacy}","received_events_url":"https://api.github.com/users/johnwalley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/johnwalley/pub-tube-map/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T11:26:18Z","updated_at":"2015-12-27T13:55:51Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/comments/167414630","html_url":"https://github.com/johnwalley/pub-tube-map/issues/4#issuecomment-167414630","issue_url":"https://api.github.com/repos/johnwalley/pub-tube-map/issues/4","id":167414630,"user":{"login":"johnwalley","id":981531,"avatar_url":"https://avatars.githubusercontent.com/u/981531?v=3","gravatar_id":"","url":"https://api.github.com/users/johnwalley","html_url":"https://github.com/johnwalley","followers_url":"https://api.github.com/users/johnwalley/followers","following_url":"https://api.github.com/users/johnwalley/following{/other_user}","gists_url":"https://api.github.com/users/johnwalley/gists{/gist_id}","starred_url":"https://api.github.com/users/johnwalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnwalley/subscriptions","organizations_url":"https://api.github.com/users/johnwalley/orgs","repos_url":"https://api.github.com/users/johnwalley/repos","events_url":"https://api.github.com/users/johnwalley/events{/privacy}","received_events_url":"https://api.github.com/users/johnwalley/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T13:55:51Z","updated_at":"2015-12-27T13:55:51Z","body":"Currently using this modified version of mbostock's auto wrap function.\r\n\r\n````\r\nfunction wrap(text) {\r\n  text.each(function() {\r\n    var text = d3.select(this);\r\n    var lines = text.text().split(/\\n/);\r\n\r\n    var y = text.attr(\"y\");\r\n    var x = text.attr(\"x\");\r\n    var dy = parseFloat(text.attr(\"dy\"));\r\n\r\n    var tspan = text.text(null).append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", dy + \"em\").text(lines[0]);\r\n\r\n    for (var lineNum = 1; lineNum < lines.length; lineNum++) {\r\n      tspan = text.append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", lineNum * 1.1 + dy + \"em\").text(lines[lineNum])\r\n    };\r\n\r\n  });\r\n}\r\n````\r\n\r\nWe hard code the line breaks into the original strings."}}