Skip to content

Latest commit

 

History

History
74 lines (58 loc) · 2.22 KB

migrate-from-mxgraph.md

File metadata and controls

74 lines (58 loc) · 2.22 KB

Migrate from mxGraph

This page is a work in progress. Comments are welcome by creating an issue or opening a discussion.!

The maxGraph APIs are not fully compatible with the mxGraph APIs, but the maxGraph APIs are close to the former mxGraph APIs. The concepts are the same, so experienced mxGraph users should be able to switch from mxGraph to maxGraph without issues.

The major changes are the removal of support for Internet Explorer (including VML support) and Legacy Edge.

Application setup

Remove the

  • mxgraph dependency and add maxgraph@core instead.
  • mxGraph initialization code using the factory function. Access maxGraph objects directly.

TypeScript

Remove the

  • @typed-mxgraph/typed-mxgraph dependency in the package.json file
  • typeroots settings related to typed-mxgraph in the tsconfig.json file

As an example, you can check this project which has been migrated from a typed-mxgraph example.

General guidelines

  • The names of mxGraph objects were all prefixed with mx. The prefix has been dropped in maxGraph.
  • Most names remain the same.
  • Some utility functions, whose implementation is natively available in modern versions of ECMAScript, have been removed.

Style related properties

Property rename

Property type change from number (0 or 1) to boolean (if not specified, as of [email protected]):

  • anchorPointDirection
  • absoluteArcSize (as of [email protected])
  • autosize
  • backgroundOutline (as of [email protected])
  • bendable
  • cloneable
  • curved
  • dashed
  • deletable
  • editable
  • endFill
  • entryPerimeter
  • exitPerimeter
  • fixDash
  • flipH
  • flipV
  • foldable
  • glass
  • horizontal
  • imageAspect
  • movable
  • noEdgeStyle
  • noLabel
  • orthogonal
  • orthogonalLoop
  • pointerEvents
  • resizable
  • resizeHeight
  • resizeWidth
  • rotatable
  • rounded
  • shadow
  • startFill
  • swimlaneLine