fix: pending review fixes for sticky notes (#4493)
This commit is contained in:
@ -75,7 +75,6 @@ export const getElementContainingPosition = (
|
||||
elements: readonly ExcalidrawElement[],
|
||||
x: number,
|
||||
y: number,
|
||||
excludedType?: ExcalidrawElement["type"],
|
||||
) => {
|
||||
let hitElement = null;
|
||||
// We need to to hit testing from front (end of the array) to back (beginning of the array)
|
||||
@ -84,13 +83,7 @@ export const getElementContainingPosition = (
|
||||
continue;
|
||||
}
|
||||
const [x1, y1, x2, y2] = getElementAbsoluteCoords(elements[index]);
|
||||
if (
|
||||
x1 < x &&
|
||||
x < x2 &&
|
||||
y1 < y &&
|
||||
y < y2 &&
|
||||
elements[index].type !== excludedType
|
||||
) {
|
||||
if (x1 < x && x < x2 && y1 < y && y < y2) {
|
||||
hitElement = elements[index];
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user