mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-25 02:10:38 +02:00
fix: False bind timeout indicator
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
@@ -1099,6 +1099,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
isOverlapping = !!(
|
isOverlapping = !!(
|
||||||
startBounds &&
|
startBounds &&
|
||||||
endBounds &&
|
endBounds &&
|
||||||
|
startElement.id !== endElement.id &&
|
||||||
doBoundsIntersect(startBounds, endBounds)
|
doBoundsIntersect(startBounds, endBounds)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -8517,10 +8518,12 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
this.state,
|
this.state,
|
||||||
{ newArrow: true },
|
{ newArrow: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
this.handleDelayedBindModeChange(element, boundElement);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: We need the flushSync here for the
|
||||||
|
// delayed bind mode change to see the right state
|
||||||
|
// (specifically the `newElement`)
|
||||||
|
flushSync(() => {
|
||||||
this.setState((prevState) => {
|
this.setState((prevState) => {
|
||||||
let linearElementEditor = null;
|
let linearElementEditor = null;
|
||||||
let nextSelectedElementIds = prevState.selectedElementIds;
|
let nextSelectedElementIds = prevState.selectedElementIds;
|
||||||
@@ -8559,6 +8562,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
selectedLinearElement: linearElementEditor,
|
selectedLinearElement: linearElementEditor,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isBindingElement(element)) {
|
||||||
|
this.handleDelayedBindModeChange(element, boundElement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user