Skip to content

Commit 03afd54

Browse files
MightyPorkPrimoz Susa
authored andcommitted
Make negative scaleFactor reverse middle arrow correctly (visjs#3474)
1 parent 69acf4d commit 03afd54

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)