feat(ui): render the Display panel's Draw controls from the store

This commit is contained in:
Sameh Khamis committed 2026-10-30 23:45:03 -07:00
1 parent bca7495cbf
commit b870df4199
9 files changed
+92 -42

No files matched your search

+8 -2
View File
@@ -218,9 +218,15 @@ function harness() {
const previousWindow = globalThis.window;
globalThis.document = documentDouble;
globalThis.window = globalThis.window || {};
const tool = initDrawTool({ viewer, annotations });
const shown = { view: null };
const tool = initDrawTool({
viewer,
annotations,
publish: (view) => (shown.view = view),
});
return {
tool,
shown,
viewer,
annotations,
byId,
@@ -289,7 +295,7 @@ test('Draw refuses to start when something else holds the pointer', async () =>
assert.equal(pointerOwner(), 'directions', 'and must not steal the claim');
// Named by its tool, not by the internal owner id.
assert.equal(
h.element('draw-hint').textContent,
h.shown.view.hint,
'Directions is using the pointer — close it first.',
);
assert.equal(h.tool.diagnostics().sceneHandler, false, 'no handler was bound');