Do not trigger arrow binding for linear elements

This commit is contained in:
Mark Tolmacs
2025-08-13 20:30:38 +02:00
parent 8c751cec45
commit c9f553b78d

View File

@@ -2,6 +2,7 @@ import { pointFrom } from "@excalidraw/math";
import { bindOrUnbindBindingElement } from "@excalidraw/element/binding"; import { bindOrUnbindBindingElement } from "@excalidraw/element/binding";
import { import {
isSimpleArrow,
isValidPolygon, isValidPolygon,
LinearElementEditor, LinearElementEditor,
newElementWith, newElementWith,
@@ -83,6 +84,7 @@ export const actionFinalize = register<FormData>({
app.scene, app.scene,
); );
if (isSimpleArrow(element)) {
const newArrow = !appState.selectedLinearElement?.selectedPointsIndices; const newArrow = !appState.selectedLinearElement?.selectedPointsIndices;
const selectedPointsIndices = newArrow const selectedPointsIndices = newArrow
@@ -105,6 +107,7 @@ export const actionFinalize = register<FormData>({
bindOrUnbindBindingElement(element, draggedPoints, scene, appState, { bindOrUnbindBindingElement(element, draggedPoints, scene, appState, {
newArrow, newArrow,
}); });
}
if (linearElementEditor !== appState.selectedLinearElement) { if (linearElementEditor !== appState.selectedLinearElement) {
// `handlePointerUp()` updated the linear element instance, // `handlePointerUp()` updated the linear element instance,