-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
There was a problem hiding this 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!
Basically _computeSchematicPositionBeforeLayout should return the correct schematic position for children (offset by all parent groups) |
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
1965697
to
6483bf8
Compare
@seveibar This is what you mean't by having another function to compute the offset for the decedent's? |
@@ -308,18 +308,48 @@ export class Group<Props extends z.ZodType<any, any, any> = typeof groupProps> | |||
} | |||
} | |||
|
|||
_computeSchematicPositionBeforeLayout(): void { | |||
const { db } = this.root! |
There was a problem hiding this comment.
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
@imrishabh18 i'll record a video for you |
/close #390