refactor: directly use mxGraph value objects #2745
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The mxGraph initializer module now exports main mxGraph objects that are used several times in the library. This make the code easier to read and reduce the size of minified bundles.
So, when used, there is no more need to prefix the call of mxGraph object by mxgraph. For instance, instead of writing
mxgraph.mxConstants.XXX
, it is possible to writemxConstants.XXX
.Notice that in files where both values (from mxGraph) and types (from typed-mxgraph) are imported, the types are aliased to avoid name clash. The convention taken is to postfix the type by
Type
to make it explicit.Notes
Refactoring detected during #2366
Size decrease in the minified IIFE bundle: 1554b / 1.51kb
master: 3d36ba7
No change