Skip to content

Commit

Permalink
🐞 Fix(client): keymap zindex와 drag offset 제한
Browse files Browse the repository at this point in the history
  • Loading branch information
p1n9d3v authored and p1n9d3v committed Dec 6, 2024
1 parent 1ef5f4a commit b19432d
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 b19432d

Please sign in to comment.