{"action":"opened","issue":{"url":"https://api.github.com/repos/tomwanzek/d3-ng2-demo/issues/27","repository_url":"https://api.github.com/repos/tomwanzek/d3-ng2-demo","labels_url":"https://api.github.com/repos/tomwanzek/d3-ng2-demo/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/tomwanzek/d3-ng2-demo/issues/27/comments","events_url":"https://api.github.com/repos/tomwanzek/d3-ng2-demo/issues/27/events","html_url":"https://github.com/tomwanzek/d3-ng2-demo/issues/27","id":300525016,"number":27,"title":"can not read property 'button' of null","user":{"login":"FunnyZ","id":18480722,"avatar_url":"https://avatars1.githubusercontent.com/u/18480722?v=4","gravatar_id":"","url":"https://api.github.com/users/FunnyZ","html_url":"https://github.com/FunnyZ","followers_url":"https://api.github.com/users/FunnyZ/followers","following_url":"https://api.github.com/users/FunnyZ/following{/other_user}","gists_url":"https://api.github.com/users/FunnyZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FunnyZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FunnyZ/subscriptions","organizations_url":"https://api.github.com/users/FunnyZ/orgs","repos_url":"https://api.github.com/users/FunnyZ/repos","events_url":"https://api.github.com/users/FunnyZ/events{/privacy}","received_events_url":"https://api.github.com/users/FunnyZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-27T07:50:29Z","updated_at":"2018-02-27T07:50:29Z","closed_at":null,"author_association":"NONE","body":"i do my demo just like drag-zoom-2.component.ts, but it also can not use.\r\n```ts\r\nfunction zoomed(this: SVGSVGElement) {\r\n      let e: D3ZoomEvent<SVGSVGElement, any> = d3.event;\r\n      d3G.attr('transform', e.transform.toString());\r\n    }\r\n...\r\nif (this.parentNativeElement !== null) {\r\n      d3ParentElement = d3.select(this.parentNativeElement);\r\n\r\n      this.d3Svg = d3ParentElement.select<SVGSVGElement>('svg');\r\n      this.d3Svg.attr('width', width + margin.left + margin.right);\r\n      this.d3Svg.attr('height', height + margin.top + margin.bottom);\r\n\r\n      d3G = this.d3Svg.append<SVGGElement>('g');\r\n      d3G.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\r\n\r\n      let treeMap = d3.tree().size([height, width]);\r\n      let nodes;\r\n      nodes = d3.hierarchy(treeData, d => d.children);\r\n      nodes = treeMap(nodes);\r\n\r\n      let link = d3G.selectAll('.link')\r\n        .data(nodes.descendants().slice(1))\r\n        .enter()\r\n        .append('path')\r\n        .attr('class', 'link')\r\n        .style('stroke', d => d['data']['level'])\r\n        .attr('d', d => diagonal(d));\r\n\r\n      let node = d3G.selectAll('.node')\r\n        .data(nodes.descendants())\r\n        .enter()\r\n        .append<SVGGElement>('g')\r\n        .attr('class', d => {\r\n          return 'node' + (d['children'] ? ' node--internal' : ' node--leaf');\r\n        })\r\n        .attr('transform', d => 'translate(' + d['y'] + ',' + d['x'] + ')');\r\n\r\n      node.append<SVGCircleElement>('circle')\r\n        .attr('r', d => d['data']['value'])\r\n        .style('stroke', d => d['data']['type'])\r\n        .style('fill', d => d['data']['level']);\r\n\r\n      node.append('text')\r\n        .attr('dy', '.35em')\r\n        .attr('x', d => {\r\n          return d['children'] ? (d['data']['value'] + 4) * -1 : d['data']['value'] + 4;\r\n        })\r\n        .style('text-anchor', d => d['children'] ? 'end' : 'start')\r\n        .text(d => d['data']['name']);\r\n\r\n      this.d3Svg.call(d3.zoom<SVGSVGElement, any>()\r\n        .scaleExtent([1 / 2, 8])\r\n        .on('zoom', zoomed));\r\n    }\r\n```\r\nmy d3-ng2-service version: 2.0.0.\r\nThanks for help!"}}
{"actor":{"display_login":"FunnyZ"}}