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).
This fixes a bug where Modeling#updateLabel would not work on
text annotations, because these need to have labels pre-configured.
* Modeling#updateLabel now takes the (optional) newBounds
* newBounds must now explicitly be passed to trigger resize
for text annotations
* newBounds is _only_ passed for text annotations via
LabelEditingProvider (it was discarded before anyway)
* lib/features/label-editing did not depend on lib/features/modeling
for historical reasons. It now uses the offical #updateLabel
API provided by Modeling
* Localize test diagrams
Closes#753
* take target attach and parent hints on `connection.create`
rule into account to implement create from context-menu
Related to bpmn-io/diagram-js#242
Closes#742
Add basic auto-placement of boundary events:
* handle top aligned events
* handle bottom aligned events
* take boundary events into account when placing
host elements and vice versa
Related to #563
Elements will automatically be created at appropriate
positions when context menu create entries are being
clicked (rather than dragged).
This marks a major step forward for mobile modeling,
too as dragging, especially dragging out from very small
controls is very cumbersome to do.
Things we take into account:
* for bpmn:FlowNodes, we try to compute the current
distance between elements on the flow based on
connections going in and out of the flow nodes
source element
* for bpmn:TextAnnotation we assume placement of the
element top right of the source shape
* for bpmn:DataObject and friends we assume a
placement bottom right of the source shape
* for all elements, we try not to place elements on
top of each other; i.e. new elements will be pushed
up or down accordingly, if an element at a chosen
position does already exist
Integration into other services:
* context pad provider works with autoPlace, if
available and defaults to drag start without
* auto placed elements are selected and direct editing
may conditionally be activated based on element type
(LabelEditingProvider knows the rules)
Users can out out of autoPlace by specifying the configuration
property `config.contextPad.autoPlace = false`.
Closes#563
BREAKING CHANGE:
* This breaks the default interaction from the context
pad; if you rely on clicking to start the drag
you can opt out of autoPlace:
```
new BpmnJS({ contextPad: { autoPlace: false } });
```
* 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
* use bpmnFactory for cloning to ensure all relevant
elements have actual IDs
* don't copy dataAssociations, as they are visual elements
that will be created during element re-connection
NOTE: This fixes data input association not properly being
wired during target replace, too.
Closes#694, #693
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.
Chrome and other modern desktop browsers
ship with touch features out of the box.
Because of that, it is not possible to use
the check
```
'ontouchstart' in document.documentElement
```
This improves the import and export of BPMN 2.0 XML documents
+ improves di prefix collision handling
+ proper deconflicting of prefixes during export
+ validate and detect non-BPMN root elements
+ replace underlying XML parser for higher speed and smaller
bundle size
+ pass parse warnings with errors
NOTE:
* some error messages on broken XML may have changed
due to changes in the underlying XML parser