Browse Source

Make negative scaleFactor reverse middle arrow correctly (#3474)

jittering-top
Ondřej Hruška 7 years ago
committed by Yotam Berkowitz
parent
commit
1fd58cc847
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      lib/network/modules/components/edges/util/EdgeBase.js

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

@ -538,6 +538,7 @@ class EdgeBase {
} }
} }
if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow
let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.
var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);

Loading…
Cancel
Save