feat(draw): answer the Draw controls through the display store

The draw tool no longer looks up or listens on its controls. It connects
toggleDraw, setDrawShape, setDrawColor, setDrawLabel and clearDraw to the
display store, which now holds several owners and lets the newest owner
of an action answer it, and it publishes the colour and label beside the
shape, state and hint. The Draw panel renders the shape choice with
UiSegmented and binds the label and colour to what the tool publishes.

The label field's own Enter listener goes: the session's capture-phase
key handler already finishes the shape from that field.
This commit is contained in:
Sameh Khamis committed 2026-11-01 10:10:27 -08:00
1 parent 3c3f8e3e67
commit a6e85db8be
10 files changed
+283 -134

No files matched your search

+4
View File
@@ -64,6 +64,10 @@ export function createApplicationTools({
viewer,
annotations,
publish: (view) => displayStore.publishDraw(view),
connect: (actions) => {
const token = displayStore.connect(actions);
return () => displayStore.detach(token);
},
});
defer(() => drawTool?.destroy());
// DISPLAY ▸ Import: the person's own GeoJSON/KML/KMZ/GPX files, each its