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
The Dictionary class comes from the old mxGraph codebase and was introduced before ES6. Its main goal is to mimic what native JavaScript Map now provides:
The
Dictionaryclass comes from the oldmxGraphcodebase and was introduced before ES6. Its main goal is to mimic what native JavaScriptMapnow provides:maxGraph/packages/core/src/util/Dictionary.ts
Line 32 in 9130103
We should remove this class and replace its usage with
Map.Important
This class is currently part of the public API. For example, it’s used to access overlays on a
CellState:maxGraph/packages/core/src/view/cell/CellState.ts
Lines 56 to 57 in 9130103
The only extra feature provided by
Dictionaryis thatremove(key)returns the removed element (if any).In
Map, this can be replaced by:This usage is rare in the codebase and should be easy to migrate.