From 7a9ccf149c15221de90bb9f119192dd2fdb0a8fd Mon Sep 17 00:00:00 2001 From: bchanot Date: Thu, 19 Nov 2026 15:04:27 +0100 Subject: [PATCH] chore(editor): rev 4 leftovers: closeTrace returns nothing, doc reflow --- .../src/editor/annotations/creationWork.ts | 5 ++-- docs/ANNOTATION-RENDERING.md | 30 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apps/app/src/editor/annotations/creationWork.ts b/apps/app/src/editor/annotations/creationWork.ts index d9cacfe3..3f90ce67 100644 --- a/apps/app/src/editor/annotations/creationWork.ts +++ b/apps/app/src/editor/annotations/creationWork.ts @@ -100,11 +100,10 @@ export function popVertex(): void { } /** The tracing closes (three vertices at least): « Nouvelle zone » opens. */ -export function closeTrace(): boolean { +export function closeTrace(): void { const points = tracedPoints(creation()) - if (!points || points.length < 3) return false + if (!points || points.length < 3) return patch({ closed: true, dialog: true }) - return true } /** diff --git a/docs/ANNOTATION-RENDERING.md b/docs/ANNOTATION-RENDERING.md index 90c06bbf..6f10763a 100644 --- a/docs/ANNOTATION-RENDERING.md +++ b/docs/ANNOTATION-RENDERING.md @@ -180,23 +180,23 @@ The point handle covers the selected point's own circle (at least the hit radius), so the whole marker can be held. A chosen vertex is drawn bigger, filled and ringed, never by colour alone. -A selected polygon (zone, or a link traced as a polygon) gets its handles in -the same layer, in this order: one « + » at the midpoint of each segment -(wrapping from the last vertex to the first), then one vertex handle per -vertex, then the « − » bubble of the chosen vertex, a rounded rectangle drawn -just above that vertex. Each is a `role="button"` with `tabindex="0"`, so Tab and -Shift+Tab walk them in document order. They sit in one `` named -« Sommets de {nom} »; each name carries the shape's display name in the current -locale: « Sommet {n} de {nom} », « Ajouter un sommet après le sommet {n} de -{nom} », « Retirer le sommet {n} de {nom} ». A « + » is not drawn while its segment -is shorter than two hit radii on screen at the current zoom (R-9); Insert or the -« + » key on a vertex still reaches it. The « − » bubble is `aria-disabled` and greyed -while the polygon has three vertices. Above 40 vertices (`HANDLE_CAP`, T18) -the layer draws no handle at all: the overlay keeps the selection outline. +A selected polygon (zone, or a link traced as a polygon) gets its handles in the +same layer, in this order: one « + » at the midpoint of each segment (wrapping +from the last vertex to the first), then one vertex handle per vertex, then the +« − » bubble of the chosen vertex, a rounded rectangle drawn just above that +vertex. Each is a `role="button"` with `tabindex="0"`, so Tab and Shift+Tab walk +them in document order. They sit in one `` named « Sommets de +{nom} »; each name carries the shape's display name in the current locale: +« Sommet {n} de {nom} », « Ajouter un sommet après le sommet {n} de {nom} », +« Retirer le sommet {n} de {nom} ». A « + » is not drawn while its segment is +shorter than two hit radii on screen at the current zoom (R-9); Insert or the +« + » key on a vertex still reaches it. The « − » bubble is `aria-disabled` and +greyed while the polygon has three vertices. Above 40 vertices (`HANDLE_CAP`, +T18) the layer draws no handle at all: the overlay keeps the selection outline. No handle covers the polygon's interior: a press inside it still reads the core's markers, so an annotation drawn on top is the one a click reaches. A -path, or an annotation without geometry, gets no handle. The pending shape of -a resumed creation gets the same handles (see the creation marks below). +path, or an annotation without geometry, gets no handle. The pending shape of a +resumed creation gets the same handles (see the creation marks below). Marks of a gesture in progress, drawn by the overlay: