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>, customIntersector?: LineSegment<GlobalPoint>,
): GlobalPoint => { ): GlobalPoint => {
const elbowed = isElbowArrow(arrowElement); const elbowed = isElbowArrow(arrowElement);
const point = const point = LinearElementEditor.getPointAtIndexGlobalCoordinates(
customIntersector && !elbowed arrowElement,
? customIntersector[0] startOrEnd === "start" ? 0 : -1,
: LinearElementEditor.getPointAtIndexGlobalCoordinates( elementsMap,
arrowElement, );
startOrEnd === "start" ? 0 : -1,
elementsMap,
);
if (arrowElement.points.length < 2) { if (arrowElement.points.length < 2) {
// New arrow creation, so no snapping // New arrow creation, so no snapping