π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
fix(editor): slow the click-target sweep and tie it to elapsed time
Luis Ortiz74ac8eef2b52
diff --git a/src/ui/shared/AnnotationEditor.tsx b/src/ui/shared/AnnotationEditor.tsxindex 157ba25..d37ed7b 100644--- a/src/ui/shared/AnnotationEditor.tsx+++ b/src/ui/shared/AnnotationEditor.tsx@@ -229,6 +229,7 @@ const TARGET_MARCH = [26, 10];const DASH_PERIOD = 13;const MARCH_PERIOD = 36;const TARGET_MARCH_CYCLES = 4;+const PULSE_PERIOD_MS = 5200;const TARGET_SWEEP: [number, number, number][] = [[0, 0.35, 0.9],@@ -434,8 +435,8 @@ export default function AnnotationEditor({ screenshot, tool, onDone, onCancel }:useEffect(() => {if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;let raf = 0;- const loop = () => {- setPulse((p) => (p + 0.015) % 1);+ const loop = (elapsed: number) => {+ setPulse((elapsed % PULSE_PERIOD_MS) / PULSE_PERIOD_MS);raf = requestAnimationFrame(loop);};raf = requestAnimationFrame(loop);