Fix: Auto-scale PCB on file change by keying PCBViewer with circuitJsonKey#1653
Closed
Ayushjhawar8 wants to merge 1 commit intotscircuit:mainfrom
Closed
Fix: Auto-scale PCB on file change by keying PCBViewer with circuitJsonKey#1653Ayushjhawar8 wants to merge 1 commit intotscircuit:mainfrom
Ayushjhawar8 wants to merge 1 commit intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
seveibar
requested changes
Nov 2, 2025
Contributor
seveibar
left a comment
There was a problem hiding this comment.
do you know this fixes it? If this solution works- then the issue is actually in PCBViewer not RunFrame
Contributor
Author
ah yeah, so I was thinking the RunFrame workaround would solve it by forcing a remount whenever the board changes. But i think you're right. I will relook the issue |
Anshgrover23
suggested changes
Nov 3, 2025
Anshgrover23
left a comment
There was a problem hiding this comment.
@Ayushjhawar8 Can u close this one, as now the solution is in another repo.
Contributor
Author
|
Sure @Anshgrover23. Thanks for reminding. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PCBViewer’suseEffectcallsresetTransform()on mount or whencircuitJsonchanges.keyprop usingcalculateCircuitJsonKey(circuitJson)inPcbViewerWithContainerHeight.tsx.circuitJson(and key) changes, causing React to remountPCBViewer.resetTransform(), auto-scaling the view to the new board.