mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Remove elbow arrow snap incorrect optimization
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
95a2b03686
commit
de91f092a7
1 changed files with 2 additions and 7 deletions
|
@ -22,8 +22,6 @@ import {
|
||||||
isDevEnv,
|
isDevEnv,
|
||||||
} from "@excalidraw/common";
|
} from "@excalidraw/common";
|
||||||
|
|
||||||
import { isPointInShape } from "@excalidraw/utils/collision";
|
|
||||||
|
|
||||||
import type { AppState } from "@excalidraw/excalidraw/types";
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -55,7 +53,7 @@ import {
|
||||||
type NonDeletedSceneElementsMap,
|
type NonDeletedSceneElementsMap,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
import { aabbForElement, getElementShape, pointInsideBounds } from "./shapes";
|
import { aabbForElement, pointInsideBounds } from "./shapes";
|
||||||
|
|
||||||
import type { Bounds } from "./bounds";
|
import type { Bounds } from "./bounds";
|
||||||
import type { Heading } from "./heading";
|
import type { Heading } from "./heading";
|
||||||
|
@ -2222,10 +2220,7 @@ const getGlobalPoint = (
|
||||||
zoom?: AppState["zoom"],
|
zoom?: AppState["zoom"],
|
||||||
): GlobalPoint => {
|
): GlobalPoint => {
|
||||||
if (isDragging) {
|
if (isDragging) {
|
||||||
if (
|
if (element) {
|
||||||
element &&
|
|
||||||
isPointInShape(initialPoint, getElementShape(element, elementsMap))
|
|
||||||
) {
|
|
||||||
const snapPoint = bindPointToSnapToElementOutline(
|
const snapPoint = bindPointToSnapToElementOutline(
|
||||||
arrow,
|
arrow,
|
||||||
element,
|
element,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue