From 44a7759219ec44db3afbf72948dec3cfecda007e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 10 Jun 2019 16:02:39 +0200 Subject: [PATCH] Fix Path._addBevelJoin() edge case --- src/path/Path.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 71454a0d..5385e349 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -2846,8 +2846,9 @@ statics: { normal1 = curve1.getNormalAtTime(1).multiply(radius) .transform(strokeMatrix), normal2 = curve2.getNormalAtTime(0).multiply(radius) - .transform(strokeMatrix); - if (normal1.getDirectedAngle(normal2) < 0) { + .transform(strokeMatrix), + angle = normal1.getDirectedAngle(normal2); + if (angle < 0 || angle >= 180) { normal1 = normal1.negate(); normal2 = normal2.negate(); }