{"action":"opened","issue":{"url":"https://api.github.com/repos/Yoctol/react-d3-cloud/issues/56","repository_url":"https://api.github.com/repos/Yoctol/react-d3-cloud","labels_url":"https://api.github.com/repos/Yoctol/react-d3-cloud/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/Yoctol/react-d3-cloud/issues/56/comments","events_url":"https://api.github.com/repos/Yoctol/react-d3-cloud/issues/56/events","html_url":"https://github.com/Yoctol/react-d3-cloud/issues/56","id":195887295,"number":56,"title":"Regenerating the cloud adds new SVGs","user":{"login":"paulpdaniels","id":2528918,"avatar_url":"https://avatars.githubusercontent.com/u/2528918?v=3","gravatar_id":"","url":"https://api.github.com/users/paulpdaniels","html_url":"https://github.com/paulpdaniels","followers_url":"https://api.github.com/users/paulpdaniels/followers","following_url":"https://api.github.com/users/paulpdaniels/following{/other_user}","gists_url":"https://api.github.com/users/paulpdaniels/gists{/gist_id}","starred_url":"https://api.github.com/users/paulpdaniels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulpdaniels/subscriptions","organizations_url":"https://api.github.com/users/paulpdaniels/orgs","repos_url":"https://api.github.com/users/paulpdaniels/repos","events_url":"https://api.github.com/users/paulpdaniels/events{/privacy}","received_events_url":"https://api.github.com/users/paulpdaniels/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-15T19:03:24Z","updated_at":"2016-12-15T19:03:24Z","closed_at":null,"body":"There is a bug currently if the word props are updated and the cloud is re-rendered. The system keeps adding new `svg` elements instead of updating the existing one.\r\n\r\nThe code [here](https://github.com/Yoctol/react-d3-cloud/blob/master/src/WordCloud.js#L64-L65) seems to be the issue. If you insert a `d3.select('svg').remove()` right before it, it seems to fix the issue.\r\n\r\nI can submit a PR to that effect unless there is a more performant way to do this."}}
{"actor":{"display_login":"paulpdaniels"}}