fix: update window positioning to prevent overlap with the top of the viewport

This commit is contained in:
shiyu
2025-12-15 15:14:37 +08:00
parent b319b545fc
commit 18f59f8d33
3 changed files with 4 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ export const AppWindowsLayer: React.FC<AppWindowsLayerProps> = ({ windows, onClo
const dx = e.clientX - startX;
const dy = e.clientY - startY;
let newX = Math.max(0, originX + dx);
let newY = Math.max(48, originY + dy);
let newY = Math.max(0, originY + dy);
dragRef.current.newX = newX;
dragRef.current.newY = newY;
const el = windowEls.current[id];