Skip to content

Commit

Permalink
fix: window position
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzuming committed Dec 5, 2024
1 parent 0c1e21e commit 86264e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/window/WindowFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export const WindowFrame = forwardRef((props: PropsWithChildren<WindowFrameProps

setPosition(
roundCoords({
x: initialPosition.x ?? calcCoord(center.x, center.x + width, width, viewport.width, windowMargin),
y: initialPosition.y ?? calcCoord(center.y, center.y + height, height, viewport.height, windowMargin),
x: initialPosition.x ?? calcCoord(windowMargin, center.x + width, width, viewport.width, windowMargin),
y: initialPosition.y ?? calcCoord(windowMargin, center.y + height, height, viewport.height, windowMargin),
}),
);
}
Expand Down

0 comments on commit 86264e3

Please sign in to comment.