|
|
@ -133,6 +133,7 @@ import {
|
|
|
|
shouldEnableBindingForPointerEvent,
|
|
|
|
shouldEnableBindingForPointerEvent,
|
|
|
|
updateBoundElements,
|
|
|
|
updateBoundElements,
|
|
|
|
getSuggestedBindingsForArrows,
|
|
|
|
getSuggestedBindingsForArrows,
|
|
|
|
|
|
|
|
getHoveredElementsForBinding,
|
|
|
|
} from "../element/binding";
|
|
|
|
} from "../element/binding";
|
|
|
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
|
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
|
|
import { mutateElement, newElementWith } from "../element/mutateElement";
|
|
|
|
import { mutateElement, newElementWith } from "../element/mutateElement";
|
|
|
@ -10038,12 +10039,20 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
|
|
|
|
|
|
|
|
const suggestedBindings = pointerCoords.reduce(
|
|
|
|
const suggestedBindings = pointerCoords.reduce(
|
|
|
|
(acc: NonDeleted<ExcalidrawBindableElement>[], coords) => {
|
|
|
|
(acc: NonDeleted<ExcalidrawBindableElement>[], coords) => {
|
|
|
|
const hoveredBindableElement = getHoveredElementForBinding(
|
|
|
|
const hoveredBindableElement = isElbowArrow(linearElement)
|
|
|
|
|
|
|
|
? getHoveredElementsForBinding(
|
|
|
|
|
|
|
|
coords,
|
|
|
|
|
|
|
|
this.scene.getNonDeletedElements(),
|
|
|
|
|
|
|
|
this.scene.getNonDeletedElementsMap(),
|
|
|
|
|
|
|
|
this.state.zoom,
|
|
|
|
|
|
|
|
true,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: getHoveredElementForBinding(
|
|
|
|
coords,
|
|
|
|
coords,
|
|
|
|
this.scene.getNonDeletedElements(),
|
|
|
|
this.scene.getNonDeletedElements(),
|
|
|
|
this.scene.getNonDeletedElementsMap(),
|
|
|
|
this.scene.getNonDeletedElementsMap(),
|
|
|
|
this.state.zoom,
|
|
|
|
this.state.zoom,
|
|
|
|
isArrowElement(linearElement) && isElbowArrow(linearElement),
|
|
|
|
isArrowElement(linearElement),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
hoveredBindableElement != null &&
|
|
|
|
hoveredBindableElement != null &&
|
|
|
|