mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-13 01:04:32 +01:00
feat: Allow inside binding for new arrows in nested cases
This commit is contained in:
@@ -1030,9 +1030,8 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
|
|
||||||
// Once the start is set to inside binding, it remains so
|
// Once the start is set to inside binding, it remains so
|
||||||
const arrowStartIsInside =
|
const arrowStartIsInside =
|
||||||
!this.state.newElement &&
|
this.state.selectedLinearElement.initialState.arrowStartIsInside ||
|
||||||
(this.state.selectedLinearElement.initialState.arrowStartIsInside ||
|
arrow.startBinding?.elementId === hoveredElement.id;
|
||||||
arrow.startBinding?.elementId === hoveredElement.id);
|
|
||||||
|
|
||||||
// Change the global binding mode
|
// Change the global binding mode
|
||||||
flushSync(() => {
|
flushSync(() => {
|
||||||
@@ -1100,10 +1099,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.previousHoveredBindableElement = null;
|
this.previousHoveredBindableElement = null;
|
||||||
} else if (
|
} else if (!this.bindModeHandler) {
|
||||||
!this.bindModeHandler &&
|
|
||||||
(!this.state.newElement || !arrow.startBinding)
|
|
||||||
) {
|
|
||||||
// We are hovering a bindable element
|
// We are hovering a bindable element
|
||||||
this.bindModeHandler = setTimeout(effector, BIND_MODE_TIMEOUT);
|
this.bindModeHandler = setTimeout(effector, BIND_MODE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user