mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-26 02:40:07 +02:00
Fix orbit binding highlight
This commit is contained in:
@@ -698,17 +698,24 @@ export const maybeSuggestBindingsForBindingElementAtCoords = (
|
||||
linearElement: NonDeleted<ExcalidrawArrowElement>,
|
||||
startOrEndOrBoth: "start" | "end" | "both",
|
||||
scene: Scene,
|
||||
pointerCoords: GlobalPoint,
|
||||
): ExcalidrawBindableElement[] => {
|
||||
const startCoords = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||
linearElement,
|
||||
0,
|
||||
scene.getNonDeletedElementsMap(),
|
||||
);
|
||||
const endCoords = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||
linearElement,
|
||||
-1,
|
||||
scene.getNonDeletedElementsMap(),
|
||||
);
|
||||
const startCoords =
|
||||
startOrEndOrBoth === "start"
|
||||
? pointerCoords
|
||||
: LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||
linearElement,
|
||||
0,
|
||||
scene.getNonDeletedElementsMap(),
|
||||
);
|
||||
const endCoords =
|
||||
startOrEndOrBoth === "end"
|
||||
? pointerCoords
|
||||
: LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||
linearElement,
|
||||
-1,
|
||||
scene.getNonDeletedElementsMap(),
|
||||
);
|
||||
const startHovered = getHoveredElementForBinding(
|
||||
startCoords,
|
||||
scene.getNonDeletedElements(),
|
||||
|
@@ -466,6 +466,7 @@ export class LinearElementEditor {
|
||||
? "start"
|
||||
: "end",
|
||||
app.scene,
|
||||
pointFrom<GlobalPoint>(scenePointerX, scenePointerY),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user