feat(org-chart): separate fixed and auto layout previews

This commit is contained in:
shkim4 committed 2026-10-12 18:02:39 +09:00
1 parent 80583eb4ca
commit a92913d6bc
18 files changed
+1211 -7

No files matched your search

+33
View File
@@ -24,6 +24,39 @@ chart.destroy();
## Organization links and employee information (P3)
### Layout boundary (P5-1A)
`layoutMode?: 'fixed' | 'auto'` is independent of `displayMode`. The default
`'fixed'` keeps the existing Workdesk composition and its display-mode behavior.
`'auto'` currently selects the **P5-1A initial preview**, showing the representative
and immediate organization groups from the validated hierarchy. Descendants stay
in the dataset and statistics but are not placed in this preview. Automatic
recursive placement/recalculation/collision prevention belongs to P5-1B;
collapse controls and Zoom/Pan remain deferred. No preview readiness state claims
those later features are complete.
Use `companyId` with Auto to select an existing company preset (default `hanmac`).
The seven IDs are `hanmac`, `saman`, `jangheon-industry`, `jangheon`, `ptc`, `halla`,
and `baron`. Main colors style only Expanded group headers; indexed secondary
variables come from that same preset. Fixed ignores this option and preserves
its organization gradients. Unknown Auto IDs reject construction with `TypeError`.
The preview reuses approved Workdesk card presentation, the same data/engine and
employee dialog; it has an independent wrapper without Fixed coordinates or scaling.
Choose `displayMode: 'readOnly'` for the matching read-only popup name policy.
```js
const chart = createOrgChart({
...configuredBaseOptions,
layoutMode: 'auto',
displayMode: 'readOnly',
companyId: 'hanmac',
});
```
Options are captured at construction: create a new handle to change the layout or
company. Standalone Tree/Summary factories keep their existing rendering paths.
### P3.2 follow-up: representative badges
Representative cards never render job-title, role or status badges, empty attribute wrappers or a badge row, including standalone specimens. They display `대표이사` / `홍 길 동`, retaining the approved 146×74 asset and existing typography, with no gap between position and name. The fixture's raw representative position (`경영진`), employee data and dialog fields remain unchanged. Other 1Depth/2Depth badge policies are preserved. This display policy takes precedence over the historical P3.2/P3.1 notes below.