From 81510b63ddfcf300e34d69a2d44f15101e262cec Mon Sep 17 00:00:00 2001 From: Felix Hayashi Date: Wed, 27 Jan 2016 17:31:40 +0100 Subject: [PATCH] Fixed wrong variable reference see #1608 --- HISTORY.md | 1 + lib/network/modules/components/edges/util/EdgeBase.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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);