Handles two new scenarios:
1. A user wants to connect an event-based gateway to an event-based
gateway target with existing incoming sequence flows. The existing
sequence flows are removed before connecting the new one.
2. A user wants to replace a gateway, that is already connected to
event-based gateway targets, with an event-based gateway. The existing
incoming sequence flows of the targets, which do not belong to the
newly replaced event-based gateway, are removed before the replacement
operation finishes.
This is because target elements in an event gateway configuration
must not have any additional incoming sequence flows other than
that from the event gateway.
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
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
This makes the viewer emit events during SVG and XML export.
These events allow others to hook in, i.e. to trigger additional _save_
actions.
Closes#811
* take numeric line height into account when
rendering text labels
* take line height into account when directly
editing labels
* use default line height of 1.2 for text rendering
Closes#803
ensure valid BPMN 2.0 parent when
* creating/moving data store
* removing participant
* turning process into collaboration
* turning collaboration into process
Closes#483
Since breaking changes were introduced in diagram-js
popupMenu methos calls need to be adjusted
* call popupMenu#open with element, id and position as params
* call popupMenu#isEmpty with element and providerId as params
* remove popupMenu#create call
* 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).