Commit Graph

82 Commits

Author SHA1 Message Date
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 e4dbc422bf chore(project): migrate to tiny-svg@1.x 2018-03-28 10:49:55 +02:00
Nico Rehwaldt 11f5a22471 chore(project): adjust min-dash usage (2) 2018-03-22 11:59:39 +01:00
TheSharpieOne Bot 245d1d6a96 chore(project): upgrade lodash to min-dash 2018-03-22 11:59:39 +01:00
Nico Rehwaldt e8e5e2ced9 chore(project): update to min-dom@2 2018-03-22 00:54:59 +01:00
Nico Rehwaldt f15407d95b chore(Viewer): inline logo as SVG
Make logo retina friendly and save 30 bytes.

Closes #119
2018-01-02 13:46:15 +01: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 50da47e1e1 fix(Viewer): trigger resized on attach
Ensure components get notified on `canvas.resized`, whenever
the Viewer instance gets attached.
2017-12-07 11:59:25 +01:00
Nico Rehwaldt e0104e3589 chore(Viewer): handle import error outside try/catch 2017-11-28 13:24:36 +01:00
Nico Rehwaldt 2ef82970fd chore(Viewer): re-expose loaded definitions
The previous release kinda removed access to the currently
loaded definitions.

This restores access by exposing it by `Viewer#getDefinitions()`.
2017-11-23 09:49:54 +01:00
Nico Rehwaldt 642d7b88af chore(Viewer+Modeler): consistently name private instance variables
BREAKING CHANGE:

* definitions, container and moddle have been prefixed with
  an underscore (_) to denote they are private use.
2017-11-20 15:28:29 +01:00
Nico Rehwaldt ce45e9081b chore(project): bump bpmn-moddle dep
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
2017-11-15 19:55:34 +01:00
Nico Rehwaldt 4c01a5dab1 fix(Viewer): correctly export <defs> node on IE
Closes #710
2017-09-29 11:42:34 +02:00
Juan Manuel Osorio Gerdts e16d2f5d02 feat(viewer): stronger check for jQuery
Closes #664
2017-02-27 15:28:30 +01:00
Christian Kaps 6dc4af5396 feat(Viewer): allow dynamic attach / detach from DOM
Closes #655

BREAKING CHANGE:

* Viewer / Modeler do not attach to `body` anymore per
  default. Use `new Viewer({ container: 'body' })` to
  restore the old behavior.
2017-01-27 13:28:27 +01:00
Philipp Fromme db0ce65aa4 feat(graphics): remove snapsvg
Related to bpmn-io/diagram-js#50
2016-11-01 15:20:22 +01:00
Nico Rehwaldt 37eca38dac feat(Viewer): make importXML callback optional
People could be hooking up with import via events, too.
2016-03-17 17:44:56 +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
Nico Rehwaldt ff0d88bb90 chore(Viewer+Modeler): inherit from Diagram
* simplifies event handling
* relies on Diagram#clear to reset the diagram before
  successive imports
* allows diagram services to be re-used across imports
* allows diagram services to be injected (or retrieved)
  before import

Closes #237
2016-03-17 17:44:32 +01:00
Nico Rehwaldt f573a36071 chore(Modeler): remove bpmn-moddle id-support
* Handle id tracking ourself.
* Do not reinstantiate moddle on re-import (now stateless)
* <3

Closes #493
2016-03-17 17:27:13 +01:00
davcs86 49173abdad feat(i18n): add localization
* Palette, ContextPad, Errors...

Closes #491
2016-03-11 20:10:10 +01:00
Vladimirs Katusenoks c793c01169 fix(viewer): moddle extensions
Remove .only from test, replace merge with assign, add extra test

Relates to #471
2016-02-25 14:18:29 +01:00
davcs86 0fb1bf616e feat: add additional (default!) moddle descriptor to viewer
Closes #471
2016-02-25 13:10:56 +01:00
Nico Rehwaldt d09ec1c19d feat(Viewer): add #off to remove event listeners
Closes #470
2016-02-16 10:36:21 +01:00
Nico Rehwaldt 851dfb67d0 docs(Viewer): document APIs 2016-02-11 17:20:41 +01:00
Nico Rehwaldt a1479669d4 feat(Viewer+Modeler): add powered by lightbox
Instead of directly redirecting to the project website
the project logo will now open a lightbox, stating the
powered by and allowing the user visit the project
site as part of an informed decision.

Closes #445
2016-01-12 08:56:24 +01:00
Nico Rehwaldt 22686f7614 fix(Viewer): allow canvas configuration
Closes #444
2016-01-08 14:42:09 +01:00
David Luis Wiegandt 6e2ec62b00 feat(Viewer): indicate empty model through an error
Fail import with an error message if the XML does not contain
a valid diagram.

Closes #417
2015-12-08 15:18:13 +01:00
Ricardo Matias 4930fd72d4 fix(viewer): add priority and context arguments to events
Closes #393
2015-10-22 14:08:45 +02:00
Nico Rehwaldt 800f0a3a5a docs(Viewer): document extensibility
Related to #258
2015-05-04 14:58:03 +02:00
Nico Rehwaldt 788b143f27 fix(Viewer): do not cache moddle
This may have unwanted side-effects, i.e. when using id
validation and caching.

We must ensure the meta-model element is actually instance stateless in
order to safely cache it.
2015-02-17 12:04:03 +01:00
Nico Rehwaldt 4854c96067 fix(import): correctly dispatch parse warnings
Fixes our bpmn-moddle integration to correctly dispatch parse warnings
from bpmn-moddle to the client.

Related to bpmn-io/moddle-xml#5

Closes #58
2015-02-17 11:00:00 +01:00
Nico Rehwaldt 8c61906469 feat(bpmn-js): allow custom model extensions to be passed
Related to bpmn-io/bpmn-moddle#15
2015-02-12 15:50:23 +01:00
Nico Rehwaldt 04437a8354 chore(project): remove jquery
Related to bpmn-io/bpmn-js#189
2015-02-06 15:26:41 +01:00
Nico Rehwaldt 3996408404 chore(project): migrate to modularized lodash@3
* use specialized lodash utilities
* consistently apply 'use strict'

Related to #185
2015-02-02 14:46:21 +01:00
Nico Rehwaldt 85e512c97d feat(modeler): add bendpoints
It is now possible to add bendpoints to flows or drag bendpoints to
update their position / trigger reconnects.

Upon bendpoint move a rule is checked to figure out whether or not a
bendpoint operation is allowed or not.

Closes #123
Closes #138
Closes #139
Closes #165
2015-01-20 17:19:56 +01:00
Nico Rehwaldt 5735a8bc3a feat(library): add navigated viewer
This adds an additional viewer variant that contains canvas navigation
features.

Related to #169
2015-01-10 12:04:26 +01:00
Nico Rehwaldt 574af0814d feat(bpmn-js): add #destroy method and allow custom position
Closes #100
2014-12-18 09:45:45 +01:00
Nico Rehwaldt 7246b75708 chore(Viewer): compress code 2014-12-08 14:04:44 +01:00
Nico Rehwaldt 1c6058e6cb chore(bpmn-js): adjust to diagram-js changes
Related to #151
2014-11-26 11:31:23 +01:00
Nico Rehwaldt 90513e94b4 feat(toolkit): use 100% as default height / width 2014-11-21 09:22:51 +01:00
Nico Rehwaldt c58532aeac chore(import): reorganize import related functionality
This commit puts all import related stuff into the import module.

The core module remains as an entry point to require the basic modules
needed by bpmn-js. At the time this is { import, draw }.
2014-10-30 12:06:43 +01:00
Nico Rehwaldt 85150135a6 chore(Viewer): remove unnecessary code 2014-09-04 13:47:31 +02:00
Nico Rehwaldt 53dc82349e fix(Viewer): export base layer as SVG only
This commit fixes the SVG export of bpmn-js.

* exports the base layer only (no overlays, no markers)
* assigns correct view box to exported SVG

Related to #97
2014-08-17 19:09:46 +02:00
jdotzki b5ba814952 improve(viewer): clean up SVG before export
Remove outer-marker-bound <rect> from export.

close bpmn-io/bpmn-js#97
2014-08-17 12:17:15 +02:00
Nico Rehwaldt 4f6d57accf fix(Viewer): freakin fix SVG export performance
From /.*<svg[^>]*>|<\/svg>.*$/g to /^.*<svg[^>]*>|<\/svg>.*$/g, spot the
   difference.
2014-08-06 15:22:06 +02:00
Nico Rehwaldt 8116941fca test(overlays): add overlay support tests
Related to #54
2014-08-05 17:02:03 +02:00
Nico Rehwaldt c21b295ec2 feat(Viewer): fire <import.*> events 2014-08-05 08:34:54 +02:00
Nico Rehwaldt 925fbc98b8 chore(project): pull bpmn-moddle changes 2014-08-04 16:32:11 +02:00