Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(render): adjust exported gateways and events shape and size #35

Merged

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented May 14, 2020

This is an improvement of the initial implementation provided by #25
The dimensions of the gateways and events have been improved (width and height are the same), the label positions have also been adjusted for these BPMN elements

Screenshots with A.2.0.bpmn file from BPMN-MIWG

Notice that comparing to the #25 rendering, the sort algorithm has switched Task 2 and Task 4, so the edge from Task 2 to the end event overlaps the final gateway

svg export
It now identifies gateways and events

pr35_commit_f3e2674e_A 2 0__svg_export

bpmn-visualization-js (0.1.3 dev commit 1172325)
Label positions from the BPMN file are not used for rendering, the lib currently used arbitrary positions

pr35_commit_f3e2674e_A 2 0__bpmn-visualisation-js@1172325196f19cf601a0d022abe13836ce86a7a0

demo.bpmn.io (bpmn-js@6.5.1)
Label positions are taken from the BPMN file

pr35_commit_f3e2674e_A 2 0__bpmn-io-demo@6 5 1

@tbouffard tbouffard force-pushed the feat/adjust_exported_shape_and_size_of_gateways_and_events branch from 1b152ee to da883cb Compare May 15, 2020 08:40
tbouffard added 2 commits May 15, 2020 12:10
Optimized for bpmn export
For svg export, this required additional adjustments directly in the in the svg
exporter
@tbouffard tbouffard marked this pull request as ready for review May 15, 2020 15:14
@tbouffard tbouffard changed the title WIP Feat/adjust exported shape and size of gateways and events feat(render): adjust exported gateways and events shape and size May 15, 2020
@baptistemesta
Copy link
Contributor

That's beautiful!

// ensure to have a square shape (i.e. same width and height) for non activity elements
ShapeType shapeType = shape.getType();
if (shapeType == ShapeType.EVENT || shapeType == ShapeType.GATEWAY) {
int nodeDimension = Math.min(nodeWidth, nodeHeight);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@baptistemesta baptistemesta merged commit ba79828 into master May 15, 2020
@baptistemesta baptistemesta deleted the feat/adjust_exported_shape_and_size_of_gateways_and_events branch May 15, 2020 16:16
@tbouffard tbouffard added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants