fix(settings/user/color): wrong grid click boundaries check
This commit is contained in:
@@ -48,7 +48,7 @@ useScreenClick((x, y) => {
|
|||||||
const cellLocalY = relativeY % (CELL_SIZE + SPACING);
|
const cellLocalY = relativeY % (CELL_SIZE + SPACING);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
rectContains([0, 0, GRID_SIZE, GRID_SIZE], [col, row]) &&
|
rectContains([0, 0, GRID_SIZE - 1, GRID_SIZE - 1], [col, row]) &&
|
||||||
rectContains([0, 0, CELL_SIZE + 1, CELL_SIZE + 1], [cellLocalX, cellLocalY])
|
rectContains([0, 0, CELL_SIZE + 1, CELL_SIZE + 1], [cellLocalX, cellLocalY])
|
||||||
) {
|
) {
|
||||||
select(col, row);
|
select(col, row);
|
||||||
|
|||||||
Reference in New Issue
Block a user