Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
k2xl committed Jan 7, 2025
1 parent 06530d8 commit d5082c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/level/basicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export default function BasicLayout({ cellClassName, cellStyle, controls, hideTe
onClick(index, false, isDragging);
}
}}
onCellMouseDown={(x, y, rightClick) => {
onCellMouseDown={deviceInfo.isMobile ? (x, y, rightClick) => {
if (onClick) {
const index = y * (level.width + 1) + x;

onClick(index, rightClick);
}
}}
} : undefined}
onCellClick={!deviceInfo.isMobile ? (x, y, rightClick) => {
if (onClick) {
const index = y * (level.width + 1) + x;
Expand Down

0 comments on commit d5082c1

Please sign in to comment.