diff --git a/HISTORY.md b/HISTORY.md index 11447f1c..355fbf1c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -17,6 +17,7 @@ http://visjs.org - Fixed #1596: correct clean up of manipulation dom elements. - Fixed #1594: bug in hierarchical layout. - Fixed #1597: Allow zero borders and addressed scaling artifacts. +- Fixed #1608: Fixed wrong variable reference ### Timeline diff --git a/lib/network/modules/components/edges/util/EdgeBase.js b/lib/network/modules/components/edges/util/EdgeBase.js index 2ae06715..659313a1 100644 --- a/lib/network/modules/components/edges/util/EdgeBase.js +++ b/lib/network/modules/components/edges/util/EdgeBase.js @@ -457,11 +457,11 @@ class EdgeBase { if (position === 'from') { arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); - angle = point.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; } else if (position === 'to') { arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.6, high:1.0, direction:1}); - angle = point.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; } else { arrowPoint = this._pointOnCircle(x, y, radius, 0.175);