mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-18 19:54:35 +01:00
fix: Point click arrow creation jumping to orbit
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
@@ -671,11 +671,6 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
|
|||||||
otherBindableElement,
|
otherBindableElement,
|
||||||
elementsMap,
|
elementsMap,
|
||||||
);
|
);
|
||||||
// const otherPoint = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
|
||||||
// arrow,
|
|
||||||
// startDragged ? -1 : 0,
|
|
||||||
// elementsMap,
|
|
||||||
// );
|
|
||||||
const otherFocusPointIsInElement =
|
const otherFocusPointIsInElement =
|
||||||
otherBindableElement &&
|
otherBindableElement &&
|
||||||
otherFocusPoint &&
|
otherFocusPoint &&
|
||||||
@@ -683,11 +678,6 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
|
|||||||
|
|
||||||
// Handle outside-outside binding to the same element
|
// Handle outside-outside binding to the same element
|
||||||
if (otherBinding && otherBinding.elementId === hit?.id) {
|
if (otherBinding && otherBinding.elementId === hit?.id) {
|
||||||
// const [startFixedPoint, endFixedPoint] = getGlobalFixedPoints(
|
|
||||||
// arrow,
|
|
||||||
// elementsMap,
|
|
||||||
// );
|
|
||||||
|
|
||||||
invariant(
|
invariant(
|
||||||
!opts?.newArrow || appState.selectedLinearElement?.initialState.origin,
|
!opts?.newArrow || appState.selectedLinearElement?.initialState.origin,
|
||||||
"appState.selectedLinearElement.initialState.origin must be defined for new arrows",
|
"appState.selectedLinearElement.initialState.origin must be defined for new arrows",
|
||||||
|
|||||||
@@ -392,6 +392,7 @@ export class LinearElementEditor {
|
|||||||
// PERF: Avoid state updates if not absolutely necessary
|
// PERF: Avoid state updates if not absolutely necessary
|
||||||
if (
|
if (
|
||||||
app.state.selectedLinearElement?.customLineAngle === customLineAngle &&
|
app.state.selectedLinearElement?.customLineAngle === customLineAngle &&
|
||||||
|
linearElementEditor.initialState.altFocusPoint &&
|
||||||
(!suggestedBinding ||
|
(!suggestedBinding ||
|
||||||
isShallowEqual(app.state.suggestedBinding ?? [], suggestedBinding))
|
isShallowEqual(app.state.suggestedBinding ?? [], suggestedBinding))
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user