Layout a diagram without di
JavaScript
Permalink
Failed to load latest commit information.
lib fix(connections): apply manhattan-layout properly to connections Sep 16, 2016
test/fixtures init Sep 7, 2016
README.md init Sep 7, 2016
example.js init Sep 7, 2016
index.js init Sep 7, 2016
package.json init Sep 7, 2016

README.md

bpmn-moddle-auto-layout

Get a layouted diagram of a bpmn-process without graphical representation.

bpmn-moddle-auto-layout is built on top of bpmn-moddle.

Usage

Preconditions: The diagram has to have exactly one single startevent. Up to now, elements with children are not supported.

var AutoLayout = require('./index');

var xmlWithoutDi = '<?xml version="1.0" encoding="UTF-8"?>' +
                      '<bpmn:definitions>' +
                          /*
                          see example.js for closer look at the
                          passed in xml
                          */
                      '</bpmn:definitions>';

var autoLayout = new AutoLayout();

autoLayout.layoutProcess(xmlWithoutDi);

Resources

License

Use under the terms of the MIT license.