-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: add parameter config support to layout function #6762
Conversation
WalkthroughThis pull request introduces parameter configuration support to the layout function in the G6 library. It modifies the layout execution to accept optional layout options, enhancing flexibility in layout customization. Additionally, it updates tests and examples to reflect these changes. Changes
|
* @apiCategory layout | ||
*/ | ||
public async layout() { | ||
await this.context.layout!.postLayout(); | ||
public async layout(layoutOptions?: LayoutOptions) { |
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.
The change in the layout
method signature to accept layoutOptions
is a critical update. Ensure that all calls to this method across the codebase are updated to handle this optional parameter to avoid potential runtime errors.
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.
okk
有关联的 issue 吗? |
这个目前没有对应 issue,是 25 年规划里的一项,这个需要提个 issue 绑定上不 |
如果就关联一下,没有就不需要了。 |
Allow users to configure the
layoutOptions
parameter when calling thelayout
function to perform the layout, and this layout will not modify the default configuration.