You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
β‘ This new version enhances internationalization (i18n), improves connector configurations, and prepares for future updates with tree shaking optimizations. β‘
Changelog (only includes a summary and breaking changes): changelog
Breaking changes
Note
Some changes are introduced to prepare for tree shaking improvements as part of issue #665.
Private utility functions:
The functions utils.isNullish and utils.isNotNullish are now marked as private. They were mistakenly made public and have always been intended for internal use.
Removed utility functions:
Several utility functions, originally designed for internal use to retrieve default values for CellStateStyle and CellStyle, have been removed:
Removed Client.isBrowserSupported:
The Client.isBrowserSupported method has been removed. It was not correctly validating all the prerequisites for determining whether the browser supports maxGraph. This method is now deprecated with no direct replacement.
Moved Client.VERSION to constants.VERSION:
The VERSION constant, previously stored in Client, is now stored in the constants module to ensure its immutability, as it represents the actual version of maxGraph.
Relocated Translations configuration:
Configuration elements for translations have been moved from Client to TranslationsConfig. The following properties have been migrated:
ManhattanConnector: Now configured via the global ManhattanConnectorConfig object. Several properties that were previously part of EdgeStyle have moved to this configuration object:
OrthConnector: Now configured via the global OrthogonalConnectorConfig object. The following properties have been moved:
orthBuffer β buffer
orthPointsFallback β pointsFallback
Internal utility methods:
Several properties and utility methods previously exposed by EdgeStyle are now internal. For example:
The getRoutePattern method has been removed entirely, as it was not being used anywhere within the codebase.
Highlights
π Custom Shape Support for Overlays
You can now use custom shapes for overlays instead of just images. The CellRenderer provides extension points for configuring custom shapes and their associated DOM nodes.
Here is an example of custom Overlays taken from the Overlays strory ππΏ
This release enhances i18n support with the restoration of original mxGraph resource files (Chinese, English, and German) and adds French and Spanish resources. Additionally, a new configuration object, TranslationsConfig, is introduced to simplify and extend internationalization functionality in future releases.
This update is part of ongoing efforts to allow for custom i18n mechanisms in future versions (see issue #688).
π Enhanced Manhattan and Orthogonal Connector Configuration
The configuration for both the Manhattan and Orthogonal connectors is now centralized in dedicated global configuration objects: ManhattanConnectorConfig and OrthogonalConnectorConfig. This change helps clarify responsibilities and makes future tree shaking optimizations easier. Additionally, related reset functions are now available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
β‘ This new version enhances internationalization (i18n), improves connector configurations, and prepares for future updates with tree shaking optimizations. β‘
Resources
Breaking changes
Note
Some changes are introduced to prepare for tree shaking improvements as part of issue #665.
Private utility functions:
The functions
utils.isNullishandutils.isNotNullishare now marked as private. They were mistakenly made public and have always been intended for internal use.Removed utility functions:
Several utility functions, originally designed for internal use to retrieve default values for
CellStateStyleandCellStyle, have been removed:utils.getValuestringUtils.getColorstringUtils.getNumberstringUtils.getStringValueYou should now use the nullish coalescing operator (??) and Optional chaining (?.) instead.
Removed
Client.isBrowserSupported:The
Client.isBrowserSupportedmethod has been removed. It was not correctly validating all the prerequisites for determining whether the browser supports maxGraph. This method is now deprecated with no direct replacement.Moved
Client.VERSIONtoconstants.VERSION:The
VERSIONconstant, previously stored inClient, is now stored in theconstantsmodule to ensure its immutability, as it represents the actual version of maxGraph.Relocated Translations configuration:
Configuration elements for translations have been moved from
ClienttoTranslationsConfig. The following properties have been migrated:Client.defaultLanguageβTranslationsConfig.getDefaultLanguageClient.setDefaultLanguageβTranslationsConfig.setDefaultLanguageClient.languageβTranslationsConfig.getLanguageClient.setLanguageβTranslationsConfig.setLanguageClient.languagesβTranslationsConfig.getLanguagesClient.setLanguagesβTranslationsConfig.setLanguagesConnector Configuration changes:
ManhattanConnectorConfigobject. Several properties that were previously part ofEdgeStylehave moved to this configuration object:MANHATTAN_END_DIRECTIONSβendDirectionsMANHATTAN_MAX_ALLOWED_DIRECTION_CHANGEβmaxAllowedDirectionChangeMANHATTAN_MAXIMUM_LOOPSβmaxLoopsMANHATTAN_START_DIRECTIONSβstartDirectionsMANHATTAN_STEPβstepOrthogonalConnectorConfigobject. The following properties have been moved:orthBufferβbufferorthPointsFallbackβpointsFallbackInternal utility methods:
Several properties and utility methods previously exposed by
EdgeStyleare now internal. For example:getRoutePatternmethod has been removed entirely, as it was not being used anywhere within the codebase.Highlights
π Custom Shape Support for Overlays
You can now use custom shapes for overlays instead of just images. The
CellRendererprovides extension points for configuring custom shapes and their associated DOM nodes.Here is an example of custom Overlays taken from the Overlays strory ππΏ
PR_696_custom_overlays.webm
Note
For more details, see #696.
π Improved i18n Support
This release enhances i18n support with the restoration of original mxGraph resource files (Chinese, English, and German) and adds French and Spanish resources. Additionally, a new configuration object,
TranslationsConfig, is introduced to simplify and extend internationalization functionality in future releases.This update is part of ongoing efforts to allow for custom i18n mechanisms in future versions (see issue #688).
π Enhanced Manhattan and Orthogonal Connector Configuration
The configuration for both the Manhattan and Orthogonal connectors is now centralized in dedicated global configuration objects:
ManhattanConnectorConfigandOrthogonalConnectorConfig. This change helps clarify responsibilities and makes future tree shaking optimizations easier. Additionally, related reset functions are now available.What's Changed
π New Features
TranslationsConfigby @tbouffard in feat!: introduceTranslationsConfigΒ #691π Bug Fixes
π Documentation
βοΈ Refactor
isNullishandisNotNullishas private by @tbouffard in refactor!: markisNullishandisNotNullishas privateΒ #661Client.isBrowserSupportedby @tbouffard in refactor!: removeClient.isBrowserSupportedΒ #679VERSIONtoconstantsby @tbouffard in refactor!: moveVERSIONtoconstantsΒ #680OrthConnectorConfigtoOrthogonalConnectorConfigby @tbouffard in refactor: renameOrthConnectorConfigtoOrthogonalConnectorConfigΒ #685Full Changelog: v0.15.1...v0.16.0
This discussion was created from the release 0.16.0.
All reactions