This adds a method to switch displayed diagram without reimporting
xml via
```
var viewer = new Viewer({ container: container });
viewer.importXML(xml, diagramId, done);
var diagrams = viewer.getDefinitions().diagrams;
viewer.open(diagrams[1], done);
```
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
* only register keyboard bindings that are backed by actual
editor actions
* rename BpmnKeyBindings -> BpmnKeyboardBindings for parity with
diagram-js@latest
* sub-class and override _keyboardBindings_ service provided
by diagram-js
* extend spec to verify default actions
* Treat features as optional dependencies and register action
only if feature exists
* Explicitly add features to the Modeler and NavigatedViewer types
With the new version of `diagram-js`, the keyboard listeners receive
a single parameter which is an object with `KeyboardEvent` event
as the only property. `BpmnKeyBindings` needed to change in order
to make use of new version of API.
This ensures we don't accidently require files in the lib directory
via the global `lib` import. That stuff works during tests but does
not work in the final bundle.
Considerations: This plugin adds some runtime overhead to our linting
process.
* remove `BpmnGlobalConnect` provider
* use `connection.start` rule to determine whether
an element can start a connection
Closes#565Closes#870
BREAKING CHANGE:
* `BpmnGlobalConnect` got removed. Add `connection.start`
rule to specify whether connection should be allowed.
This snaps source / target to the element mid, if
the element is a `bpmn:Event`.
There is usually no more than one snap point for
an event other than the center.
Closes#850
This adds proper connection layouting for sequence
flows leaving from boundary events.
If needed, such connections will be layoute with
an U-turn.
Closes#467
This re-introduces adaptive label positioning
on label creation as a feature.
It worked before but broke during the introduction
of optional labels.
Closes#825
This partially reverts commit 891cf4ac0c
which set `sans-serif` as the default font.
Setting it back to Arial solves SVG export and rendering issues,
especially on platforms (Windows, Mac) where the default font
metrics differ highly from Arial.
NOTE: The font can still be easily overriden if integrators wish
to do so in order to give their users a more native look and feel.
Closes#819