Skip to content

Commit

Permalink
Merge pull request #200 from boostcampwm-2024/fix/prototype/keymap
Browse files Browse the repository at this point in the history
🐞 Fix(client): keymap zindex와 drag offset 제한
  • Loading branch information
Gdm0714 authored Dec 6, 2024
2 parents 1ef5f4a + b19432d commit 3a58d96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/client/src/components/Keymap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const KeyMap = () => {
position: 'fixed',
bottom: theme.spacing(2),
right: theme.spacing(2),
zIndex: 1300,
zIndex: 1200,
}}
>
<Paper
Expand Down
2 changes: 2 additions & 0 deletions apps/client/src/hooks/useDrag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default ({ initialPoint, updateFn }: Props) => {
y: curSvgPoint.y - startDragPoint.y,
};

if (Math.abs(offset.x) <= 22.5 && Math.abs(offset.y) <= 22.5) return;

updateFn({
x: initialPoint.x + offset.x,
y: initialPoint.y + offset.y,
Expand Down

0 comments on commit 3a58d96

Please sign in to comment.