#Line Tool
The purpose of this plugin is to make working with line segments a little easier.
You can drag the target node around to see the values update.
Source: https://github.com/stephen101/d3-plugins/tree/master/src/lineTool
To create new line tool
var lt = lineTool()
.x(source_pos.x)
.y(source_pos.y)
.x1(x)
.y1(y)
To calculate the angle from horizontal between the source and destination points:
lt.angle()
To calculate the distance between the source and destination points:
lt.dist()
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js