Fix org chart canvas height to fit viewport without scrolling

The height calc subtracted only 4rem but the actual overhead is ~6rem
(3rem breadcrumb bar + 3rem main padding). Also use dvh for better
mobile support.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dotta
2026-03-15 14:08:37 -05:00
parent d7f45eac14
commit 41e03bae61

View File

@@ -269,7 +269,7 @@ export function OrgChart() {
return (
<div
ref={containerRef}
className="w-full h-[calc(100vh-4rem)] overflow-hidden relative bg-muted/20 border border-border rounded-lg"
className="w-full h-[calc(100dvh-6rem)] overflow-hidden relative bg-muted/20 border border-border rounded-lg"
style={{ cursor: dragging ? "grabbing" : "grab" }}
onMouseDown={handleMouseDown}
onMouseMove={handleMouseMove}