diff --git a/apps/app/tests/unit/components.AnatomyCanvas.test.tsx b/apps/app/tests/unit/components.AnatomyCanvas.test.tsx index 5eceb481..e6843f04 100644 --- a/apps/app/tests/unit/components.AnatomyCanvas.test.tsx +++ b/apps/app/tests/unit/components.AnatomyCanvas.test.tsx @@ -17,7 +17,10 @@ let sheet: SheetIndex beforeAll(async () => { sheet = await loadTestSheet() }) -afterEach(cleanup) +afterEach(() => { + cleanup() + vi.restoreAllMocks() +}) /** The composed view, or a test failure naming why it is missing. */ function svgOf(index: SheetIndex, viewId: string): SVGSVGElement { @@ -110,7 +113,6 @@ describe('AnatomyCanvas', () => { const name = hip.getAttribute('data-anno-name-fr') expect(name).toBeTruthy() expect(container.textContent).toContain(name) - vi.restoreAllMocks() }) it('applies the states right after the build, on both elements of a point', async () => { diff --git a/docs/ANNOTATION-RENDERING.md b/docs/ANNOTATION-RENDERING.md index 7400d138..89a2e054 100644 --- a/docs/ANNOTATION-RENDERING.md +++ b/docs/ANNOTATION-RENDERING.md @@ -69,8 +69,10 @@ id or a class. An access (kind `detail_trigger`) never hides another annotation (D11). On the editor, the catalogue and the bilan, the page reads every element under the -pointer (`elementsFromPoint`, bounded to the canvas, `anatomy/annotationPick.ts`) -and takes the first annotation that is not an access; an access answers only +pointer (`elementsFromPoint`, bounded to the canvas) and takes the first +annotation that is not an access (`anatomy/annotationPick.ts` for the catalogue +and the bilan; the editor applies the same rule in `editor/annotations/press.ts`, +`Hit.access` and `pressTarget`, bounded by the viewport); an access answers only where no other annotation lies. The same pick drives the click and the tooltip. The paint order of the core is unchanged. The access labels (Part 6) are page buttons over the drawing, outside the layer. The canvas sets and removes