diff --git a/packages/lab/catalog/src/App.tsx b/packages/lab/catalog/src/App.tsx index 7e65612daa..b40e876f68 100644 --- a/packages/lab/catalog/src/App.tsx +++ b/packages/lab/catalog/src/App.tsx @@ -361,11 +361,7 @@ export function App({ catalog }: AppProps) { }), ) if (window.location.hash.startsWith("#annotations=")) url.hash = window.location.hash - window.history.replaceState( - null, - "", - url, - ) + window.history.replaceState(null, "", url) }, [activeVariant.id, activeFlow?.id, selectedScreen, ui.mode, ui.viewerOpen]) useEffect(() => { diff --git a/packages/lab/catalog/src/components/AnnotationEditor.tsx b/packages/lab/catalog/src/components/AnnotationEditor.tsx index ace8705eb7..a787335333 100644 --- a/packages/lab/catalog/src/components/AnnotationEditor.tsx +++ b/packages/lab/catalog/src/components/AnnotationEditor.tsx @@ -51,8 +51,14 @@ export function AnnotationEditor(props: AnnotationEditorProps) { onPointerDown={(event) => { if (event.target !== event.currentTarget) return const bounds = event.currentTarget.getBoundingClientRect() - const column = Math.min(props.cols - 1, Math.max(0, Math.floor(((event.clientX - bounds.left) / bounds.width) * props.cols))) - const row = Math.min(props.rows - 1, Math.max(0, Math.floor(((event.clientY - bounds.top) / bounds.height) * props.rows))) + const column = Math.min( + props.cols - 1, + Math.max(0, Math.floor(((event.clientX - bounds.left) / bounds.width) * props.cols)), + ) + const row = Math.min( + props.rows - 1, + Math.max(0, Math.floor(((event.clientY - bounds.top) / bounds.height) * props.rows)), + ) setDraft({ row, column, note: "" }) }} > @@ -83,7 +89,9 @@ export function AnnotationEditor(props: AnnotationEditorProps) { >
{draft.id ? "Edit annotation" : "New annotation"} - R{draft.row + 1} · C{draft.column + 1} + + R{draft.row + 1} · C{draft.column + 1} +