Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move non-subcircuit group #431

Closed
wants to merge 5 commits into from
Closed

Conversation

imrishabh18
Copy link
Member

/close #390

@imrishabh18 imrishabh18 requested a review from seveibar December 17, 2024 20:11
Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad implementation but i have a slightly different one in mind that i think coupd be better- each parent returns it’s “transform” to its children (something like _computeSchematicTransform), this is better than offsetting in a later render phase.

I can give it a try shortly, feel free to take a stab!

@seveibar
Copy link
Contributor

Basically _computeSchematicPositionBeforeLayout should return the correct schematic position for children (offset by all parent groups)

Copy link

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@imrishabh18 imrishabh18 force-pushed the feat/non-subcircuit-group branch from 1965697 to 6483bf8 Compare December 21, 2024 20:37
@imrishabh18
Copy link
Member Author

@seveibar This is what you mean't by having another function to compute the offset for the decedent's?

@imrishabh18 imrishabh18 requested a review from seveibar December 21, 2024 20:46
@@ -308,18 +308,48 @@ export class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
}
}

_computeSchematicPositionBeforeLayout(): void {
const { db } = this.root!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method shouldnt mutate, never mutate db unless you're definitely inside a render phase and the name of the method makes sense to mutate

@seveibar
Copy link
Contributor

@imrishabh18 i'll record a video for you

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

Successfully merging this pull request may close these issues.

Non-subcircuit Groups don't properly offset schematic components, can cause traces not to render
3 participants