fix: fixes issue with textbox selection

This commit is contained in:
Mark Mankarious committed 2023-09-02 12:52:44 +01:00
1 parent 6c3a4ce6c9
commit 9903755052
1 file changed
+7 -1
+7 -1
View File
@@ -470,7 +470,13 @@ export const getItemAtTile = ({
const textBoxTo = getTextBoxTo(tb); const textBoxTo = getTextBoxTo(tb);
const textBoxBounds = getBoundingBox([ const textBoxBounds = getBoundingBox([
tb.tile, 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); return isWithinBounds(tile, textBoxBounds);