The tile position label was not entirely visible when hovering the tiles
near the top/right of the screen.
This modification ensures that the label is always visible by moving it to
the opposite side of the tile if there is not enough space to display it
on the default position.