fix: Other binding converted from fixed to orbit unconditionally (#10748)
* fix: Other binding converted from fixed to orbit unconditionally Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: New arrow creation Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Alt point setting on inside binding Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Initial arrow creation with Alt Signed-off-by: Mark Tolmacs <mark@lazycat.hu> --------- Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
@@ -810,10 +810,13 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
|
|||||||
elementsMap,
|
elementsMap,
|
||||||
);
|
);
|
||||||
|
|
||||||
const other: BindingStrategy =
|
const otherNeverOverride = opts?.newArrow
|
||||||
otherBindableElement &&
|
? appState.selectedLinearElement?.initialState.arrowStartIsInside
|
||||||
!otherFocusPointIsInElement &&
|
: otherBinding?.mode === "inside";
|
||||||
appState.selectedLinearElement?.initialState.altFocusPoint
|
const other: BindingStrategy = !otherNeverOverride
|
||||||
|
? otherBindableElement &&
|
||||||
|
!otherFocusPointIsInElement &&
|
||||||
|
appState.selectedLinearElement?.initialState.altFocusPoint
|
||||||
? {
|
? {
|
||||||
mode: "orbit",
|
mode: "orbit",
|
||||||
element: otherBindableElement,
|
element: otherBindableElement,
|
||||||
@@ -832,7 +835,8 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
|
|||||||
elementsMap,
|
elementsMap,
|
||||||
) || otherEndpoint,
|
) || otherEndpoint,
|
||||||
}
|
}
|
||||||
: { mode: undefined };
|
: { mode: undefined }
|
||||||
|
: { mode: undefined };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: startDragged ? current : other,
|
start: startDragged ? current : other,
|
||||||
|
|||||||
@@ -8743,6 +8743,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
selectedPointsIndices: [endIdx],
|
selectedPointsIndices: [endIdx],
|
||||||
initialState: {
|
initialState: {
|
||||||
...linearElementEditor.initialState,
|
...linearElementEditor.initialState,
|
||||||
|
arrowStartIsInside: event.altKey,
|
||||||
lastClickedPoint: endIdx,
|
lastClickedPoint: endIdx,
|
||||||
origin: pointFrom<GlobalPoint>(
|
origin: pointFrom<GlobalPoint>(
|
||||||
pointerDownState.origin.x,
|
pointerDownState.origin.x,
|
||||||
|
|||||||
Reference in New Issue
Block a user