summaryrefslogtreecommitdiff
path: root/frontend/views
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/views')
-rw-r--r--frontend/views/graph/components/graph.editor.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/views/graph/components/graph.editor.js b/frontend/views/graph/components/graph.editor.js
index c21c624..a6d46d4 100644
--- a/frontend/views/graph/components/graph.editor.js
+++ b/frontend/views/graph/components/graph.editor.js
@@ -245,14 +245,18 @@ class GraphCanvas extends Component {
const dy = y2 - y1
const angle = Math.atan2(dy, dx)
const farOffset = 20
+ const endOffset = 1
x1 += Math.cos(angle) * 0
x2 -= Math.cos(angle) * farOffset
y1 += Math.sin(angle) * 0
y2 -= Math.sin(angle) * farOffset
+ const xEnd = x2 - Math.cos(angle) * endOffset
+ const yEnd = y2 - Math.sin(angle) * endOffset
const leftAngle = mod(angle - Math.PI / 6, Math.PI * 2)
const rightAngle = mod(angle + Math.PI / 6, Math.PI * 2)
ctx.moveTo(x1, y1)
- ctx.lineTo(x2, y2)
+ ctx.lineTo(xEnd, yEnd)
+ ctx.moveTo(x2, y2)
ctx.lineTo(x2 - headlen * Math.cos(leftAngle), y2 - headlen * Math.sin(leftAngle))
ctx.moveTo(x2, y2)
ctx.lineTo(x2 - headlen * Math.cos(rightAngle), y2 - headlen * Math.sin(rightAngle))