NOTE 2020-12-16: Now we decide to migrate to typed-mxgraph, which is a more complete repository that matches the npm package. v1.0.6 is the final version.
This project is typescript definitions for mxGraph.
This project provide global type definitions for mxgraph, if you are working with official mxgraph npm package, please see our new package typed-mxgraph
which design for mxgraph npm package.
install mxgraph-type-definitions
dependencie and append node_modules/mxgraph-type-definitions
to typeRoots
in tsconfig.json
npm install --save-dev mxgraph-type-definitions
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"esModuleInterop": true,
"typeRoots": [
"node_modules/@types",
"node_modules/mxgraph-type-definitions"
]
}
}
As #29 said, mxClient
will not work if installed via npm. It is recommended to add this project as a submodule to you project. Here is a demo. If you are using this npm package, typed-mxgraph
may be more appropriate.
The definitions currently target mxGraph 4.1.1
. See the implementation status in the following table.
Module | Progress | Checked |
---|---|---|
editor | not yet | no |
handler | completed | no |
io | completed | no |
layout | completed | no |
model | completed | no |
shape | completed | no |
util | partial | no |
view | partial | no |
mxClient.d.ts | completed | no |
We are actively developing, if you want to be a contributor, please refer to the following links