feat: Allow inside binding for new arrows in nested cases
This commit is contained in:
parent
acc1241015
commit
55115d2ee4
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user