From 6408040623f7d3e98d2b53d490f84eac2960f629 Mon Sep 17 00:00:00 2001 From: Twest2 Date: Mon, 15 Jun 2026 09:43:09 -0500 Subject: [PATCH] Show proper display names in the annotation Type dropdown The annotation editor's "Type" select used the raw lowercase type id (e.g. "rect") as its label. Add an ANNOTATION_TYPE_LABELS map so it shows "Rectangle", "Tooltip", "Number", etc. instead. --- app/renderer/editor.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/renderer/editor.js b/app/renderer/editor.js index 22dba8d..5cd17da 100644 --- a/app/renderer/editor.js +++ b/app/renderer/editor.js @@ -24,6 +24,21 @@ const ANNOTATION_FIELDS = { cursor: [], }; +// Display names for annotation types in the "Type" dropdown. +const ANNOTATION_TYPE_LABELS = { + rect: 'Rectangle', + oval: 'Oval', + line: 'Line', + arrow: 'Arrow', + text: 'Text', + tooltip: 'Tooltip', + number: 'Number', + blur: 'Blur', + highlight: 'Highlight', + magnify: 'Magnify', + cursor: 'Cursor', +}; + function blockText(block) { for (const key of ['code', 'text', 'body', 'value', 'content']) { const value = block && block[key]; @@ -962,7 +977,7 @@ class GuideEditor { const style = selected.style || {}; const typeSelect = makeSelect(selected.type, [ 'rect', 'oval', 'line', 'arrow', 'text', 'tooltip', 'number', 'blur', 'highlight', 'magnify', 'cursor', - ].map((type) => ({ value: type, label: type }))); + ].map((type) => ({ value: type, label: ANNOTATION_TYPE_LABELS[type] || type }))); const textInput = el('input', { type: 'text', value: selected.text || '', placeholder: 'Annotation text' }); const valueInput = el('input', { type: 'number', value: Number.isFinite(selected.value) ? selected.value : '', placeholder: 'Value' }); const strokeInput = el('input', { type: 'color', value: style.stroke || '#E5484D' });