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: 🎸 modified configs() #13

Merged
merged 1 commit into from
Dec 7, 2021
Merged

feat: 🎸 modified configs() #13

merged 1 commit into from
Dec 7, 2021

Conversation

yangxy1998
Copy link

layout.configs() needs return the constructor of modules.
Now every module type value has a constructor:

layout.configs().default // SugiyamaLayout
{
    name: 'SugiyamaLayout',
    parameters: {...},
    constructor: SugiyamaLayout{...}
}

Then we can use the constructor to create a new object.

layout.layout = new (layout.configs().range[1].constructor)()// new ogdf.Module.Layout.FMMMLayout()

@JackieAnxis JackieAnxis merged commit 06b5168 into master Dec 7, 2021
@JackieAnxis JackieAnxis deleted the constructor branch December 7, 2021 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants