bpmn-visualization-js icon indicating copy to clipboard operation
bpmn-visualization-js copied to clipboard

[FEAT] Review Gateway rendering

Open tbouffard opened this issue 5 years ago • 5 comments
trafficstars

Is your feature request related to a problem? Please describe. Review if this will be better to have rounded gateway for consistency with other shapes (we tend to use rounded elements for shapes and icons)

Describe the solution you'd like Consider something like kogito/kie-tools does

image

Additional context This should be possible to do this with mxGraph quadTo or arcTo canvas functions.

⚠️ Thanks to discuss with us on this issue to propose your different renderings before to implement one of them.

tbouffard avatar Oct 09 '20 13:10 tbouffard

Hello, I'm interested in this issue. Thanks.

AhmadMSadek avatar Oct 21 '22 09:10 AhmadMSadek

Hi 👋🏻 Thank you for your interest. I assigned you this issue 🙂 If you need any helps, don't hesitate to contact us 😉

csouchet avatar Oct 21 '22 11:10 csouchet

@AhmadMSadek Hello, do you still intend to work on this issue? We haven't seen any activity in the last 2 months.

tbouffard avatar Dec 29 '22 06:12 tbouffard

No answer, so assign the issue to myself.

tbouffard avatar Jan 03 '23 13:01 tbouffard

According to the implementation of mxRhombus from which the GatewayShape inherits, we could add style configuration to achieve what is requested in this issue. Style configuration

  • rounded: true
  • arcSize: value to be defined

See https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/shape/mxRhombus.js#L54-L64

Notice that the RhombusPerimeter doesn't consider rounded shape, see https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/view/mxPerimeter.js#L259. So the terminal points of the edges won't be placed on the edges of the gateway anymore. There will be a space between the terminal points and the stroke of the Gateway in some cases. As we disabled perimeter projections until we implement #1870, this will be visible only when the BPMN diagram doesn't define edge waypoints (which is mandatory according to the BPMN specification). As this use case is managed as best effort in bpmn-visualization, we could live with that IMHO.

tbouffard avatar Jan 03 '23 13:01 tbouffard