mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-18 15:00:39 +02:00
Fix actionFinalize for new arrow creation
This commit is contained in:
@@ -82,11 +82,12 @@ export const actionFinalize = register<FormData>({
|
||||
);
|
||||
|
||||
if (isBindingElement(element)) {
|
||||
const newArrow = !appState.selectedLinearElement?.selectedPointsIndices;
|
||||
const newArrow = !!appState.newElement;
|
||||
|
||||
const selectedPointsIndices = newArrow
|
||||
? [element.points.length - 1] // New arrow creation
|
||||
: appState.selectedLinearElement.selectedPointsIndices;
|
||||
const selectedPointsIndices =
|
||||
newArrow || !appState.selectedLinearElement.selectedPointsIndices
|
||||
? [element.points.length - 1] // New arrow creation
|
||||
: appState.selectedLinearElement.selectedPointsIndices;
|
||||
|
||||
const draggedPoints: PointsPositionUpdates =
|
||||
selectedPointsIndices.reduce((map, index) => {
|
||||
|
Reference in New Issue
Block a user