New heuristic based on minimal arrow extent

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2025-04-14 18:52:51 +02:00
parent aa91a3d610
commit 7abbb2afa3
No known key found for this signature in database

View file

@ -123,17 +123,7 @@ const calculatePadding = (
return size > 75
? 40
: Math.min(
Math.max(
headingIsHorizontal(startHeading) ? width / 2 - 1 : height / 2 - 1,
10,
),
Math.max(
headingIsHorizontal(endHeading) ? width / 2 - 1 : height / 2 - 1,
10,
),
40,
);
: Math.min(Math.max(Math.min(width / 2 - 1, height / 2 - 1), 10), 40);
};
const handleSegmentRenormalization = (