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

Refactor createDiagramContainer function #231

Merged
merged 3 commits into from Mar 6, 2023
Merged

Refactor createDiagramContainer function #231

merged 3 commits into from Mar 6, 2023

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Mar 4, 2023

Replace ExcludeDescriptions with ModuleConfiguration which can be used for both adding (one or more) additional modules and removing (one or more) default modules. This makes the entire configuration process more convenient.

For example:

const container= createDiagramContainer(myModule1, myModule2, { exclude: toolsModule}, myToolsModule, {exclude: toolPaletteModule}, myToolPaletteModule)

can now be configured as follows

const container= createDiagramContainer({
 add:[myModule1,myModule2,myToolsModule,myToolPaletteModule],
 remove:[toolsModules,toolPaletteModule]})

Naturally its also possible to directly include modules and use multiple module configurations e.g:

const container= createDiagramContainer(myModule1, myModule2, {remove: toolsModule, add:myToolsModule}, {remove:toolPaletteModule, add:myToolPaletteModule})

Replace `ExcludeDescriptions` with `ModuleConfiguration` which can be used for both adding (one or more) additional modules and removing (one or more)  default modules.
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Martin Fleck <mfleck@eclipsesource.com>
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

LGTM!

@tortmayr tortmayr merged commit 5592553 into master Mar 6, 2023
@tortmayr tortmayr deleted the issues/push branch July 14, 2023 23:25
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.

None yet

2 participants