fix: Corner jumping

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-11-25 22:27:23 +01:00
parent c141960ada
commit d34ccaffd3

View File

@@ -1202,14 +1202,11 @@ export const bindPointToSnapToElementOutline = (
customIntersector?: LineSegment<GlobalPoint>,
): GlobalPoint => {
const elbowed = isElbowArrow(arrowElement);
const point =
customIntersector && !elbowed
? customIntersector[0]
: LinearElementEditor.getPointAtIndexGlobalCoordinates(
arrowElement,
startOrEnd === "start" ? 0 : -1,
elementsMap,
);
const point = LinearElementEditor.getPointAtIndexGlobalCoordinates(
arrowElement,
startOrEnd === "start" ? 0 : -1,
elementsMap,
);
if (arrowElement.points.length < 2) {
// New arrow creation, so no snapping