Skip to content

Reset schematic view when circuit changes#191

Open
DevvoZA wants to merge 1 commit into
tscircuit:mainfrom
DevvoZA:codex/initial-fit-to-schematic
Open

Reset schematic view when circuit changes#191
DevvoZA wants to merge 1 commit into
tscircuit:mainfrom
DevvoZA:codex/initial-fit-to-schematic

Conversation

@DevvoZA
Copy link
Copy Markdown

@DevvoZA DevvoZA commented May 11, 2026

Fixes #15

Summary

  • Keep the pan/zoom transform setter stable so it can be reused outside the mouse handler
  • Reset the viewer transform back to the fitted default when the provided circuit changes
  • Preserve normal user pan/zoom behavior while viewing the same schematic

Validation

  • npx -y bun x biome format --write lib/components/SchematicViewer.tsx
  • npx -y bun x tsc --noEmit
  • npx -y bun run build

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-viewer Ready Ready Preview, Comment May 11, 2026 6:23pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initially zoom to contain the provided schematic

1 participant