JavaScript How to make the transform:translate-drag function of d3 more smooth?

In this JSFiddle I have implemented elements in svg. I want the group of elements to be draggable and I have tried it with d3.drag and using transform:translate. The drag is not smooth. It flickers and jumps here and there.

What is the reason behind it and how can it be overcome?

The drag function is as follows:

var dragcontainer = d3.drag()
  .on("start", function() {})
  .on("drag", function(d, i) {
    var x = d3.event.x;
    var y = d3.event.y;
      d3.select(this.parentNode.parentNode).attr("transform", "translate(" + x + "," + y + ")");
  })
  .on("end", function() {});
Answer:1

I'm just starting to document some Javascript code that I've written and I have a question. Looking through my vendor directory to see how the 3rd party packages do it, I've noticed that many of them ...

I'm just starting to document some Javascript code that I've written and I have a question. Looking through my vendor directory to see how the 3rd party packages do it, I've noticed that many of them ...

Functionality: A user has to enter a lecture code into an input field to enter a lecture. On the landing page, while the user types the lecture code, I want check if the code is correct and colour the ...

Functionality: A user has to enter a lecture code into an input field to enter a lecture. On the landing page, while the user types the lecture code, I want check if the code is correct and colour the ...

  1. meteor call template helper
  2. meteor call template helper from event
  3. meteor call function from template

I am trying to alert the value one of textbox of form in JavaScript but its not working and my other forms have same code of JavaScript they are working fine. I have spent lot of time to fix this ...

I am trying to alert the value one of textbox of form in JavaScript but its not working and my other forms have same code of JavaScript they are working fine. I have spent lot of time to fix this ...

  1. alert value textbox javascript
  2. alert textbox value in jquery
  3. alert textbox value
  4. alert on textbox value change jquery
  5. js alert textbox value
  6. get value textbox javascript alert

I want to send an email to a user using CasperJS. Is there any way to do it?

I want to send an email to a user using CasperJS. Is there any way to do it?

  1. send email using python
  2. send email using powershell
  3. send email using telnet
  4. send email using javascript
  5. send email using c#
  6. send email using java
  7. send email using gmail smtp
  8. send email using php
  9. send email using vba
  10. send email using quickbooks
  11. send email using telnet smtp
  12. send email using node js
  13. send email using python outlook
  14. send email using apex
  15. send email using curl
  16. send email using postfix
  17. send email using smtp c#
  18. send email using html
  19. send email using google sheets
  20. send email using command line