Guest User

Untitled

a guest
Nov 17th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. this.node = this.d3Graph.append("g")
  2. .attr("class", "nodes")
  3. .selectAll("circle")
  4. .data(Nodes)
  5. .enter()
  6. .append("svg:image")
  7. .attr("xlink:href", 'https://seeklogo.com/images/T/twitter-2012-negative-logo-5C6C1F1521-seeklogo.com.png')
  8. .attr("height", 50)
  9. .attr("width", 50)
  10. .append("text")
  11. .attr("x", 20)
  12. .attr("y", 20)
  13. .attr("fill", "black")
  14. .text("test text");
  15.  
  16. this.force.on('tick', this.tickActions);
  17.  
  18.  
  19. tickActions() {
  20. this.node
  21. .attr("transform", function(d) {
  22. return "translate(" + d.x + "," + d.y + ")";
  23. })
  24.  
  25. this.force
  26. .restart()
  27. }
Add Comment
Please, Sign In to add comment