In the diagram `di` is now accessed via the diagram element, not the
business object. This has the benefit that elements in multiple diagrams
can easily be represented.
Related to https://github.com/bpmn-io/bpmn-js/issues/1472
BREAKING CHANGE:
* Instead of referencing the `di` from the business object, reference it
from the diagram element representing it.
This commit promisifies following APIs:
BaseViewer#importXML
BaseViewer#importDefinitions
BaseViewer#open
BaseViewer#saveXML
BaseViewer#saveSVG
Modeler#createDiagram
Related to https://github.com/bpmn-io/bpmn-js/issues/812
BREAKING CHANGES:
* Users are now expected to have Promises either by default or
polyfilled as the APIs return a Promise now.
This introduces a new parameter to `Viewer#importXML`
which enables to choose the diagram to display.
```
var viewer = new Viewer({ container: container });
viewer.importXML(xml, diagramId, done);
```
Closes#87
ensure valid BPMN 2.0 parent when
* creating/moving data store
* removing participant
* turning process into collaboration
* turning collaboration into process
Closes#483
* expose API needed for lazy sub-process imports
* also changes #handleDeferred to NOT expect deferred
as a parameter anymore
Related to bpmn-io/bpmn-js-signavio-compat#1
* use ES6 import / export
* UTILS: export individual utilities
* TESTS: localize TestHelper includes
BREAKING CHANGE:
* all utilities export independent functions
* library sources got ported to ES6. You must now use
a ES module bundler such as Browserify + babelify or
Webpack to consume this library (or parts of it).
* ordering provider ensures sequence flows appear
behind tasks
* importer makes sure we render elements in the order
lanes > sequence flows > other flow elements
* consistent minimal opacity ensures elements in
front of tasks don't look _connected_
Closes#727
Async utilities properly propagate _all_ errors to the
specified _done_ callback. Failing in _done_ does not
re-invoke it.
Adjustments made in
* Viewer#importXML
* Viewer#saveSVG
* Importer#importBpmnDiagram
Tests cleaned up to remove un-necessary `if (err) { ...` snippets.
This commit adds more life-cycle events users can
plug into during xml parsing and rendering:
* import.parse.start
* import.parse.complete
* import.render.start
* import.render.complete
* import.done
Some other events had to go because of that, namely
* import.start
* import.(success|error)
BREAKING CHANGE:
* the event import.start got renamed to import.render.start
* the events import.success and import.error got removed
in favour of import.render.complete (passing err, warnings)