Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Commit 01ea991

Browse files
committed
Make negative scaleFactor reverse middle arrow correctly
1 parent f570fed commit 01ea991

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/network/modules/components/edges/util/EdgeBase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ class EdgeBase {
538538
}
539539
}
540540

541+
if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow
541542
let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.
542543

543544
var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);

0 commit comments

Comments
 (0)