process-analytics / bpmn-visualization-js

A TypeScript library for visualizing process execution data on BPMN diagrams
https://process-analytics.github.io/bpmn-visualization-js/
Apache License 2.0
224 stars 31 forks source link

[FEAT] Add button to export bpmn diagram as image in the demo page #133

Closed tbouffard closed 3 years ago

tbouffard commented 4 years ago

Is your feature request related to a problem? Please describe. I would like an "export as image button" to easily generate screenshots to be added in release notes or to better explain changes in PR.

Describe the solution you'd like In the demo example, add the button. This could serve as foundation for extra feature on top of the BPMN visualization. In addition, if possible (otherwise do it later), include

Describe alternatives you've considered The current way of doing is to do a screenshot from the web browser. This works but required to select the right zone to capture, then crop.

Additional context This should be possible directly using the mxgraph code, according to https://jgraph.github.io/mxgraph/docs/js-api/files/util/mxImageExport-js.html See also https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/editor/mxEditor.js#L1011

tbouffard commented 4 years ago

A poc for this feature is available in #555 and provides svg/png export

tbouffard commented 3 years ago

We have decided with @csouchet to mark this issue as completed as part of the #1388 implementation even if it is not available in the demo page and has limitation. If someone is interested by this topic, please create a new issue.