Browse Source

Fixed wrong variable reference

see #1608
codeClimate
Felix Hayashi 8 years ago
parent
commit
81510b63dd
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      HISTORY.md
  2. +2
    -2
      lib/network/modules/components/edges/util/EdgeBase.js

+ 1
- 0
HISTORY.md View File

@ -17,6 +17,7 @@ http://visjs.org
- Fixed #1596: correct clean up of manipulation dom elements. - Fixed #1596: correct clean up of manipulation dom elements.
- Fixed #1594: bug in hierarchical layout. - Fixed #1594: bug in hierarchical layout.
- Fixed #1597: Allow zero borders and addressed scaling artifacts. - Fixed #1597: Allow zero borders and addressed scaling artifacts.
- Fixed #1608: Fixed wrong variable reference
### Timeline ### Timeline

+ 2
- 2
lib/network/modules/components/edges/util/EdgeBase.js View File

@ -457,11 +457,11 @@ class EdgeBase {
if (position === 'from') { if (position === 'from') {
arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); 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') { else if (position === 'to') {
arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.6, high:1.0, direction:1}); 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 { else {
arrowPoint = this._pointOnCircle(x, y, radius, 0.175); arrowPoint = this._pointOnCircle(x, y, radius, 0.175);

Loading…
Cancel
Save