Version 0.22.0 released on 2025-12-11.
⚡ This new version makes default style properties globally configurable and includes bug fixes for a smoother developer experience. ⚡
Resources
- npm package: @maxgraph/core 0.22.0
- Fixed issues: milestone 0.22.0
- Documentation: maxgraph_0.22.0_website.zip
- Examples: maxgraph_0.22.0_examples.zip
- Changelog (only includes a summary and breaking changes): changelog
Highlights
Globally configurable default style properties
Previously, changing default styles required local configuration per Graph instance using a Stylesheet.
It was also not possible to configure the rounding factor used when a vertex uses a non absolute arcSize, because there was no dedicated cell style property for that.
This release solves these limitations by making the built-in defaults globally configurable.
The StyleDefaultsConfig object has been extended to allow customization of default style values that were previously hardcoded as constants.
All direct references to DEFAULT_* constants in the codebase are now replaced with StyleDefaultsConfig property access. This means you can change these defaults at runtime without updating stylesheets on every Graph instance.
New configurable properties include:
- Font settings:
fontFamily,fontSize - Arrow settings:
arrowSize,arrowSpacing,arrowWidth - Size settings:
markerSize,imageSize,startSize - Rounding:
roundingFactor,lineArcSize
You can now globally customize these defaults at runtime like this:
import { StyleDefaultsConfig } from '@maxgraph/core';
// Change default marker size
StyleDefaultsConfig.markerSize = 10;
// Change default image size for labels
StyleDefaultsConfig.imageSize = 32;
// Change default swimlane start size
StyleDefaultsConfig.startSize = 50;
// Change default rounding factor
StyleDefaultsConfig.roundingFactor = 0.4;Note
This change is especially useful if you want a consistent look across multiple graphs without duplicating stylesheet configuration, and if you need fine control over rounding/arc behavior that was not configurable before.
Bug fixes
This release also includes bug fixes that improve overall stability and consistency of rendering and styling.
If you encounter any regressions or unexpected behavior, please open an issue with a minimal reproduction so we can address it quickly.
What's Changed
🎉 New Features
- feat: accept more nullish parameter in various methods by @tbouffard in #892
- feat: allow to pass more null and undefined to Multiplicity by @tbouffard in #914
- feat: add generic font in default font family by @tbouffard in #931
- feat: make default style properties globally configurable by @tbouffard in #932
🐛 Bug Fixes
- fix(editor): ensure editor context in installDblClickHandler callback by @tbouffard in #934
- fix: restore tooltip display when PopupMenuHandler is unavailable by @chrisob194 in #970
- fix(VertexHandler): fix top-left resize handle behavior by @Lockps in #968
📝 Documentation
- docs: add badge to DeepWiki in the README by @tbouffard in #913
- docs(website): enable system color mode toggle by @tbouffard in #933
- docs: display correct title on image of the home page by @tbouffard in #951
- docs: add Contributing guide by @tbouffard in #948
⚙️ Refactor
- refactor: fix most problems in the Wires story by @tbouffard in #893
- refactor: simplify signature of the isNullish internal function by @tbouffard in #907
- refactor: migrate the
Guidesstory to TypeScript by @tbouffard in #908 - refactor: simplify implementation of ParallelEdgeLayout by @tbouffard in #909
- refactor: ensure mixins do not create shared properties in AbstractGraph by @tbouffard in #879
- refactor: simplify Editor installDblClickHandler by @tbouffard in #938
- refactor: prefer includes to indexOf by @tbouffard in #952
- refactor(Stylesheet): simplify default style creation methods by @tbouffard in #955
- refactor: introduce AbstractPathShape base class for shape hierarchy by @tbouffard in #953
- refactor: improve types usage in PageBreaksMixin by @tbouffard in #956
🛠 Chore
- test: add more tests for
FitPlugin.fitby @tbouffard in #888 - chore(typescript): always use explicit override by @tbouffard in #921
- chore: use stricter options with the TS compiler by @tbouffard in #922
- chore: add some unicorn eslint plugin rules by @tbouffard in #925
- chore: add config files for some code assistant by @tbouffard in #930
- chore: build with node 22 by @tbouffard in #937
- chore: add react patterns to dependabot configuration by @tbouffard in #964
- docs: enhance bug report template with additional guidance by @tbouffard in #967
- chore: build with node 24 by @tbouffard in #971
- ci: publish npm package with trusted publisher by @tbouffard in #972
New Contributors
- @chrisob194 made their first contribution in #970
- @Lockps made their first contribution in #968
Full Changelog: v0.21.0...v0.22.0