mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-16 18:54:34 +01:00
fix: Finalize arrow now truly finalzes
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
@@ -6399,10 +6399,36 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
this.scene.getNonDeletedElementsMap(),
|
this.scene.getNonDeletedElementsMap(),
|
||||||
(el) => maxBindingDistance_simple(this.state.zoom),
|
(el) => maxBindingDistance_simple(this.state.zoom),
|
||||||
);
|
);
|
||||||
|
if (hoveredElement) {
|
||||||
if (
|
this.actionManager.executeAction(actionFinalize, "ui", {
|
||||||
// Finalize arrow if we're inside the commit zone
|
event: event.nativeEvent,
|
||||||
hoveredElement ||
|
sceneCoords: {
|
||||||
|
x: scenePointerX,
|
||||||
|
y: scenePointerY,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.setState({ suggestedBinding: null, startBoundElement: null });
|
||||||
|
if (!this.state.activeTool.locked) {
|
||||||
|
resetCursor(this.interactiveCanvas);
|
||||||
|
this.setState((prevState) => ({
|
||||||
|
newElement: null,
|
||||||
|
activeTool: updateActiveTool(this.state, {
|
||||||
|
type: this.state.preferredSelectionTool.type,
|
||||||
|
}),
|
||||||
|
selectedElementIds: makeNextSelectedElementIds(
|
||||||
|
{
|
||||||
|
...prevState.selectedElementIds,
|
||||||
|
[multiElement.id]: true,
|
||||||
|
},
|
||||||
|
prevState,
|
||||||
|
),
|
||||||
|
selectedLinearElement: new LinearElementEditor(
|
||||||
|
multiElement,
|
||||||
|
this.scene.getNonDeletedElementsMap(),
|
||||||
|
),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
// if we haven't yet created a temp point and we're beyond commit-zone
|
// if we haven't yet created a temp point and we're beyond commit-zone
|
||||||
// threshold, add a point
|
// threshold, add a point
|
||||||
pointDistance(
|
pointDistance(
|
||||||
|
|||||||
Reference in New Issue
Block a user