mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-18 23:10:16 +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)) {
|
if (isBindingElement(element)) {
|
||||||
const newArrow = !appState.selectedLinearElement?.selectedPointsIndices;
|
const newArrow = !!appState.newElement;
|
||||||
|
|
||||||
const selectedPointsIndices = newArrow
|
const selectedPointsIndices =
|
||||||
? [element.points.length - 1] // New arrow creation
|
newArrow || !appState.selectedLinearElement.selectedPointsIndices
|
||||||
: appState.selectedLinearElement.selectedPointsIndices;
|
? [element.points.length - 1] // New arrow creation
|
||||||
|
: appState.selectedLinearElement.selectedPointsIndices;
|
||||||
|
|
||||||
const draggedPoints: PointsPositionUpdates =
|
const draggedPoints: PointsPositionUpdates =
|
||||||
selectedPointsIndices.reduce((map, index) => {
|
selectedPointsIndices.reduce((map, index) => {
|
||||||
|
Reference in New Issue
Block a user