Commit Graph

27 Commits

Author SHA1 Message Date
Nico Rehwaldt daee95743d chore(Viewer): type BPMNDiagram arg where possible 2019-04-16 15:20:12 +02:00
Valerio Spadaro 1c0585aaaf feat(Viewer): allow to select diagram to view
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
2019-04-16 15:20:12 +02:00
Nico Rehwaldt 9be61259bd chore(project): drop 'use strict'
We use ES modules, so 'use strict' is not necessary anymore.
2018-04-03 18:09:53 +02:00
Nico Rehwaldt d3449ca87c chore(project): es6ify source code
* 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).
2018-04-03 16:32:14 +02:00
Nico Rehwaldt 7ffb865023 chore(project): consistent async error handling
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.
2017-12-09 22:31:15 +01:00
Nico Rehwaldt 46d8abdd70 feat(import): allow users to hook into via events
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)
2016-03-17 17:44:56 +01:00
davcs86 49173abdad feat(i18n): add localization
* Palette, ContextPad, Errors...

Closes #491
2016-03-11 20:10:10 +01:00
Nico Rehwaldt 65c94ea9ac feat(import): pass definitions during import.start event 2015-12-08 15:18:13 +01:00
Nico Rehwaldt b5483b2565 chore(importer): attempt optimization 2014-09-08 19:04:18 +02:00
Nico Rehwaldt 6f937cf2f3 chore(import): wrap emitted errors / warnings 2014-09-04 13:47:31 +02:00
Nico Rehwaldt c21b295ec2 feat(Viewer): fire <import.*> events 2014-08-05 08:34:54 +02:00
Nico Rehwaldt cb77832fbe feat(viewer): allow additional modules to be passed
This enables users to instantiate Viewers/Modelers via

```
new Viewer({
additionalModules: [ ... ]
});
```

to bootstrap their own modules with the viewer without overriding the
existing ones.
2014-08-01 07:55:47 +02:00
Nico Rehwaldt f380a4b044 feat(lib/core): use directly linked data-model
Closes #91
2014-07-17 14:08:15 +02:00
Nico Rehwaldt ae60914146 fix(import): handle invisible root elements
This commit ensures we pipe invisible root elements (Process,
Collaboration) through our import infrastructure, too.

This way we we receive proper events for them.

Related to #6
2014-07-17 14:06:29 +02:00
Nico Rehwaldt 921de712d2 chore(import): factor out import logic to own component
This commit extracts the main import logic found in import/Importer into
the core/BpmnImporter module. By doing so we we are able to reuse it
during modeling.

Related to #6
2014-07-17 14:06:29 +02:00
Nico Rehwaldt 8ad29d034d fix(import): forgive invalid flowElements
Instead of failing hard when we parse invalid flow elements (i.e.
TextAnnotation) we log a warning that may be handled by the diagram
import.

Related to #74
2014-06-23 14:44:03 +02:00
Nico Rehwaldt c7da579f83 fix(import/Importer): clear commandStack after import 2014-06-19 09:56:31 +02:00
Nico Rehwaldt d4e55f0ba3 fix(import): hide labels of hidden elements
Closes #78
2014-06-17 11:18:33 +02:00
Nico Rehwaldt d41cad1b67 fix(importer): import label on messageFlows
Closes #76
2014-06-17 11:03:03 +02:00
Nico Rehwaldt 4e00114409 chore(project): upgrade to new diagram.js module structure 2014-06-11 14:41:55 +02:00
Nico Rehwaldt 1733bc6de9 fix(Importer): collapse subProcesses only
Related to #49
2014-05-22 10:51:40 +02:00
Nico Rehwaldt 19bf425efa feat(Import): hide child elements in collapsed parents
Closes #49
2014-05-21 16:30:17 +02:00
Nico Rehwaldt 7540186f6e fix(draw/labels): adjust font-size and no-di positioning 2014-05-06 17:24:13 +02:00
Nico Rehwaldt e8b70ebc83 feat(labels): render external / internal labels
This commit adds internal + external label rendering for

* activity
* event
* gateway
* sequenceFlow
* subProcess
* transaction

Closes #16
2014-04-30 14:31:48 +02:00
Nico Rehwaldt 02313e6c1b feat(bpmn): make available BpmnRegistry in renderer
This commit upgrades the code base to the latest diagram-js changes and
adds a component called BpmnRegistry that can be used to retrieve a
certain BPMN/DI element from a shape/connection id.

Related to #19
2014-04-03 11:55:22 +02:00
Nico Rehwaldt 2eedfcbd2c fix(build): correct jshint errors 2014-04-01 14:17:13 +02:00
Nico Rehwaldt 144776399f refactor(import+examples): reorganize files 2014-03-25 14:08:11 +01:00