-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 support to layout function #6747
base: v5
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces parameter support to the layout function in the G6 library. It modifies the layout execution process by allowing layout options to be passed as parameters, enhancing flexibility in layout configurations. The changes include updates to the layout execution logic, test cases, and examples to accommodate the new parameterized approach. Changes
|
packages/g6/src/runtime/layout.ts
Outdated
if (!this.options) return; | ||
const pipeline = Array.isArray(this.options) ? this.options : [this.options]; | ||
public async postLayout(layoutOptions?: LayoutOptions) { | ||
const executeLayoutOptions = layoutOptions ? layoutOptions : this.options; |
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 postLayout
function now accepts layoutOptions
as an optional parameter, which is a significant change. Ensure that all dependent functions and modules are compatible with this new parameter to avoid potential runtime errors.
No description provided.