How to use the @projectstorm/react-diagrams.DefaultLabelFactory function in @projectstorm/react-diagrams

To help you get started, we’ve selected a few @projectstorm/react-diagrams examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magma / magma / symphony / app / fbcnms-projects / hub / app / components / workflow / pages / diagramBuilder / Application.js View on Github external
constructor() {
    this.diagramEngine = new SRD.DiagramEngine();

    this.diagramEngine.registerLinkFactory(new LinkWithContextFactory());
    this.diagramEngine.registerLabelFactory(new DefaultLabelFactory());

    this.diagramEngine.registerPortFactory(
      new SimplePortFactory("default", config => new DefaultPortModel())
    );
    this.diagramEngine.registerPortFactory(
      new SimplePortFactory("start", config => new CircleStartPortModel())
    );
    this.diagramEngine.registerPortFactory(
      new SimplePortFactory("end", config => new CircleEndPortModel())
    );
    this.diagramEngine.registerPortFactory(
      new SimplePortFactory("fork", config => new ForkNodePortModel())
    );
    this.diagramEngine.registerPortFactory(
      new SimplePortFactory("join", config => new JoinNodePortModel())
    );