Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

A Tiny CommonJS Wrapper for mxGraph

License

Notifications You must be signed in to change notification settings

process-analytics/ts-mxgraph

 
 

Repository files navigation

A Tiny Typescript Wrapper for mxgraph

Archived on 2021-01-29: ts-mxgraph was used in bpmn-visualization until version 0.11.0, it has then been replaced by a more standard solution, see bpmn-visualization Pull Request #1040

Overview

A tiny wrapper around mxgraph that provides a configurable TypeScript compatible package.

Usage

npm i -D ts-mxgraph
import { mxgraph, mxgraphFactory } from "ts-mxgraph";

const { mxGraph, mxGraphModel } = mxgraphFactory({
    mxLoadResources: false,
    mxLoadStylesheets: false,
});

const container = document.getElementById("mxgraph-container");
if (container) {
    const model: mxgraph.mxGraphModel = new mxGraphModel();
    const graph: mxgraph.mxGraph = new mxGraph(container, model);
}

License

Apache 2.0 License

About

A Tiny CommonJS Wrapper for mxGraph

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.0%
  • TypeScript 16.0%