feat(arrow): Second-to-last point force bound endpoint inside
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
@@ -1774,9 +1774,15 @@ export const updateBoundPoint = (
|
|||||||
startOrEnd === "startBinding" ? "endBinding" : "startBinding",
|
startOrEnd === "startBinding" ? "endBinding" : "startBinding",
|
||||||
elementsMap,
|
elementsMap,
|
||||||
);
|
);
|
||||||
|
const adjacentPointIndex =
|
||||||
|
startOrEnd === "startBinding" ? 1 : arrow.points.length - 2;
|
||||||
const otherArrowPoint = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
const otherArrowPoint = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||||
arrow,
|
arrow,
|
||||||
startOrEnd === "startBinding" ? -1 : 0,
|
arrow.points.length > 2
|
||||||
|
? adjacentPointIndex
|
||||||
|
: startOrEnd === "startBinding"
|
||||||
|
? -1
|
||||||
|
: 0,
|
||||||
elementsMap,
|
elementsMap,
|
||||||
);
|
);
|
||||||
const otherFocusPointOrArrowPoint = otherFocusPoint || otherArrowPoint;
|
const otherFocusPointOrArrowPoint = otherFocusPoint || otherArrowPoint;
|
||||||
|
|||||||
Reference in New Issue
Block a user