fix: Patch over intersection calculation issue ()

* Patch over intersection calculation issue
pull/8352/head
Márk Tolmács committed by GitHub
parent 84398a7e5c
commit 261304c1a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -759,6 +759,11 @@ export const bindPointToSnapToElementOutline = (
[point[0], point[1] + 2 * bindableElement.height],
FIXED_BINDING_DISTANCE,
elementsMap,
).map((i) =>
distanceToBindableElement(bindableElement, i, elementsMap) >=
bindableElement.height / 2
? ([point[0], -1 * i[1]] as Point)
: ([point[0], i[1]] as Point),
),
...intersectElementWithLine(
bindableElement,
@ -766,13 +771,13 @@ export const bindPointToSnapToElementOutline = (
[point[0] + 2 * bindableElement.width, point[1]],
FIXED_BINDING_DISTANCE,
elementsMap,
).map((i) =>
distanceToBindableElement(bindableElement, i, elementsMap) >=
bindableElement.width / 2
? ([-1 * i[0], point[1]] as Point)
: ([i[0], point[1]] as Point),
),
].map((i) =>
distanceToBindableElement(bindableElement, i, elementsMap) >
Math.min(bindableElement.width, bindableElement.height) / 2
? ([-1 * i[0], -1 * i[1]] as Point)
: i,
);
];
const heading = headingForPointFromElement(bindableElement, aabb, point);
const isVertical =

@ -1447,8 +1447,6 @@ export class LinearElementEditor {
: null;
}
console.warn("movePoints", options?.changedElements);
const mergedElementsMap = options?.changedElements
? toBrandedType<SceneElementsMap>(
new Map([...elementsMap, ...options.changedElements]),

Loading…
Cancel
Save