feat(stammbaum): edge-fade mask when zoomed past fit (#692)

Permanent 4-edge mask-image gradient cues off-screen content when the tree is
zoomed in; nothing fades at fit. Replaces the dropped US-PAN-006 AC3 idle cue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-29 16:48:56 +02:00
parent 3827a9d059
commit ffc14dd2ff
2 changed files with 36 additions and 0 deletions

View File

@@ -610,6 +610,28 @@ describe('StammbaumTree keyboard pan/zoom (#692)', () => {
expect(view.z).toBe(1);
});
it('omits the edge-fade mask at fit (z = 1) (#692)', async () => {
render(StammbaumTree, {
nodes: [{ id: ID_A, displayName: 'Anna', familyMember: true }],
edges: [],
selectedId: null,
panZoom: { x: 0, y: 0, z: 1 },
onSelect: () => {}
});
expect(document.querySelector('svg')!.getAttribute('style') ?? '').not.toContain('mask-image');
});
it('applies the edge-fade mask when zoomed past fit (#692)', async () => {
render(StammbaumTree, {
nodes: [{ id: ID_A, displayName: 'Anna', familyMember: true }],
edges: [],
selectedId: null,
panZoom: { x: 0, y: 0, z: 2 },
onSelect: () => {}
});
expect(document.querySelector('svg')!.getAttribute('style') ?? '').toContain('mask-image');
});
it('does not call onSelect for other keys', async () => {
const onSelect = vi.fn();
render(StammbaumTree, {