Browse Source

Merge pull request #1610 from felixhayashi/fix/variable

Fixed wrong variable reference
codeClimate
Alex 9 years ago
parent
commit
f02da0b294
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 #1594: bug in hierarchical layout.
- Fixed #1597: Allow zero borders and addressed scaling artifacts.
- Fixed #1608: Fixed wrong variable reference
### Timeline

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

@ -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);

Loading…
Cancel
Save