Until now we did not properly sanitize the IDs we create for colored
markers. This would make the marker retrival fail with fill and
stroke colors encoded in hex and rgb(a, b, c) form.
This commit improves the situation by removing forbidden chars from
the marker ID.
Closes#981
Related to camunda/camunda-modeler#1342
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