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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user