fix: fixes issue with textbox selection

This commit is contained in:
Mark Mankarious
2023-09-02 12:52:44 +01:00
parent 6c3a4ce6c9
commit 9903755052

View File

@@ -470,7 +470,13 @@ export const getItemAtTile = ({
const textBoxTo = getTextBoxTo(tb);
const textBoxBounds = getBoundingBox([
tb.tile,
{ x: Math.ceil(textBoxTo.x), y: Math.ceil(textBoxTo.y) }
{
x: Math.ceil(textBoxTo.x),
y:
tb.orientation === 'X'
? Math.ceil(textBoxTo.y)
: Math.floor(textBoxTo.y)
}
]);
return isWithinBounds(tile, textBoxBounds);