Skip to content

Commit

Permalink
provide window margin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzuming committed Sep 13, 2024
1 parent 03e225b commit ac56691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/window/WindowFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ export const WindowFrame = forwardRef((props: PropsWithChildren<WindowFrameProps

setPosition(
roundCoords({
x: initialPosition.x ?? center.x,
y: initialPosition.y ?? center.y,
x: initialPosition.x ?? center.x + windowMargin,
y: initialPosition.y ?? center.y + windowMargin,
}),
);
}
},
[randomizePosition, viewport.height, viewport.width, wasMaximized],
[randomizePosition, viewport.height, viewport.width, wasMaximized, windowMargin],
);

const onContentChanged = useCallback(() => {
Expand Down

0 comments on commit ac56691

Please sign in to comment.