Enable centered tree expansion for mind-map layouts
Tree diagrams need a way to keep the root visually centered while first-level branches expand to both sides. The new center orient reuses the existing orthogonal layout pass per side, maps each side into the left or right half of the layout box, and keeps the existing LR/RL/TB/BT/radial behavior on the normal path. Constraint: Keep the feature inside the existing tree series layout and rendering model without adding dependencies. Rejected: Add a separate layout type | center expansion is still an orthogonal tree orientation, and a new layout would duplicate existing traversal behavior. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Root-child side assignment is only honored for orient:center; do not apply side to nested nodes without adding nested-side tests. Tested: npx jest --config test/ut/jest.config.cjs --coverage=false test/ut/spec/series/tree.test.ts --runInBand Tested: npx eslint src/chart/tree/TreeSeries.ts src/chart/tree/treeLayout.ts src/chart/tree/TreeView.ts test/ut/spec/series/tree.test.ts Tested: npx tsc --noEmit Tested: git diff --check -- src/chart/tree/TreeSeries.ts src/chart/tree/TreeView.ts src/chart/tree/treeLayout.ts test/tree-center.html test/ut/spec/series/tree.test.ts Tested: Chrome headless screenshot of test/tree-center.html saved at .codex-artifacts/tree-center.png Not-tested: Full visual regression suite
S
susiwen8 committed
98d3fe21e6b4c67cad5197861522d4ee4728520a
Parent: d6a812f