@maxgraph/core
maxGraph
is a TypeScript library which can display and allow interaction with vector diagrams. At a high level, it provides:
- Nodes, also known as vertices which are typically represented by shapes like rectangles.
- Edges which can be lines and arrows which normally point between one node and another.
It provides many of the diagramming features which would be expected by a piece of presentation software like Microsoft® PowerPoint™
or LibreOffice® Impress such as being able to resize, move or rotate nodes, but has a stronger focus on automatic layout
algorithms and applications of Graph Theory. It is suited towards software
which requires finer-grained customization of functionality than off-the-shelf packages.
For more details, see the maxGraph GitHub repository.
Install
npm install @maxgraph/core
Getting started
All the information is available in the README of the GitHub repository.
0.11.0
Release date: 2024-06-09
For more details, see the 0.11.0 Changelog on the GitHub release page.
This release contains enhancements, documentation improvements and bug fixes.
Breaking Changes
- In
StencilShape
, the allowEval
and defaultLocalized
static properties have been removed. Configure these properties using StencilShapeConfig
. - Logs are no longer sent to
MaxLog
by default. To restore the previous behavior, change maxGraph's global configuration with:
GlobalConfig.logger = new MaxLogAsLogger();
MaxWindow.activeWindow
is no longer available; it was intended for internal use only, so there's no reason to make it public.- The signature of
cellArrayUtils.getOpposites
has changed. It now returns an array and take an edges Cell array parameter.
Previously it was returning a function and this was an extra indirection. This is now simpler to use and match the signature of the mxGraph function. cellArrayUtils.restoreClone
is no longer available. It was intended to be private.- The signature of
cellArrayUtils.cloneCells
has changed. It now returns an array of Cells instead of a function. - The
GraphDataModel.cloneCell
function has been moved to the cellArrayUtils
namespace. The function doesn't use any internal GraphDataModel
state, and moving it into cellArrayUtils
is consistent with the cloneCells
function already there.