fix: Ctrl/Alt elbow arrow jumps (#10432)

* fix: Ctrl/Alt elbow arrow jumps

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>

* chore: Trigger build

* style

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Márk Tolmács
2025-12-01 17:06:08 +00:00
committed by GitHub
co-authored by dwelle
parent 06f01e11f8
commit 451bcac0b7
+10 -1
View File
@@ -11463,7 +11463,14 @@ class App extends React.Component<AppProps, AppState> {
): void => { ): void => {
const selectionElement = this.state.selectionElement; const selectionElement = this.state.selectionElement;
const pointerCoords = pointerDownState.lastCoords; const pointerCoords = pointerDownState.lastCoords;
if (selectionElement && this.state.activeTool.type !== "eraser") { const selectedElements = this.scene.getSelectedElements(this.state);
const onlyBindingElementSelected =
selectedElements?.length === 1 && isBindingElement(selectedElements[0]);
if (
selectionElement &&
this.state.activeTool.type !== "eraser" &&
!onlyBindingElementSelected
) {
dragNewElement({ dragNewElement({
newElement: selectionElement, newElement: selectionElement,
elementType: this.state.activeTool.type, elementType: this.state.activeTool.type,
@@ -11527,6 +11534,7 @@ class App extends React.Component<AppProps, AppState> {
snapLines, snapLines,
}); });
if (!isBindingElement(newElement)) {
dragNewElement({ dragNewElement({
newElement, newElement,
elementType: this.state.activeTool.type, elementType: this.state.activeTool.type,
@@ -11546,6 +11554,7 @@ class App extends React.Component<AppProps, AppState> {
originOffset: this.state.originSnapOffset, originOffset: this.state.originSnapOffset,
informMutation, informMutation,
}); });
}
this.setState({ this.setState({
newElement, newElement,