Update box selection to use partial overlap

Changes the behavior of drag selection to check for partial overlap rather than complete overlap, in line with other graphics programs
This commit is contained in:
Morgan Moore 2024-05-15 21:14:32 -04:00 committed by GitHub
parent 7d8b7fc14d
commit c299246c8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,10 +74,10 @@ export const getElementsWithinSelection = (
element.locked === false && element.locked === false &&
element.type !== "selection" && element.type !== "selection" &&
!isBoundToContainer(element) && !isBoundToContainer(element) &&
selectionX1 <= elementX1 && selectionX1 <= elementX2 &&
selectionY1 <= elementY1 && selectionY1 <= elementY2 &&
selectionX2 >= elementX2 && selectionX2 >= elementX1 &&
selectionY2 >= elementY2 selectionY2 >= elementY1
); );
}); });