Use GraphicsObject shape coordinates and styles in the SVG fallback - #33
Open
ugin-man wants to merge 1 commit into
Open
Use GraphicsObject shape coordinates and styles in the SVG fallback#33ugin-man wants to merge 1 commit into
ugin-man wants to merge 1 commit into
Conversation
|
@ugin-man is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
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.
When the interactive renderer falls back to
SimpleGraphicsSVG, rectangles and circles are drawn near the origin because the fallback reads top-levelx/yfields, whileGraphicsObjectstores their positions incenter. Rectangles also need their half-width and half-height subtracted for SVG's top-left coordinates. The fallback reads different field names for fill and stroke as well.Use the declared
center,fill, andstrokefields, and calculate the viewBox from the same coordinates used to render the shapes.Validation: all five new rendering regressions fail before the fix. All 27 tests (98 assertions),
tsc --noEmit, andbun run buildpass after it. Tests cover nonzero centers, rectangles centered at the origin, combined bounds, and shape colors.Prepared with Codex (Astra) assistance and verified locally.