arenaswan / mxgraph-factory

A tiny CommonJS wrapper for mxGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mxGraph Factory

Overview

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

Usage

import { mxgraph, mxgraphFactory } from "mxgraph-factory";

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

License:Apache License 2.0


Languages

Language:JavaScript 77.3%Language:TypeScript 22.7%