Skip to content

Commit

Permalink
docs(mxgraph): update references to custom code (#3137)
Browse files Browse the repository at this point in the history
Add links to the source code.
Fix reference to files (ShapeConfigurator is no longer in charge of
overriding SvgCanvas2D).
  • Loading branch information
tbouffard authored Aug 6, 2024
1 parent d8ac1fc commit e4ec2ba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/contributors/mxgraph-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The default mxGraph parent is the parent of

The bpmn input source coordinates are absolute whereas mxgraph uses coordinates in the referential of the parent cell.
As we define a parent-child relationship when inserting BPMN elements in the mxGraph model, a coordinate transformation
layer is required. See `BpmnRenderer` for more details.
layer is required. See [BpmnRenderer](../../src/component/mxgraph/BpmnRenderer.ts) for more details.


## BPMN Elements rendering and style
Expand All @@ -44,7 +44,7 @@ The [style](https://jgraph.github.io/mxgraph/docs/js-api/files/view/mxStylesheet
is defined and registered in `StyleConfigurator`. In particular, it refers to the name of a [mxShape](https://jgraph.github.io/mxgraph/docs/js-api/files/shape/mxShape-js.html)
used for the rendering.

The `mxShape` can be a standard `mxGraph` class or a custom BPMN `mxShape` defined by the `bpmn-visualization`. The custom `mxShapes` are registered by `ShapeConfigurator`
The `mxShape` can be a standard `mxGraph` class or a custom BPMN `mxShape` defined by the `bpmn-visualization`. The custom `mxShapes` are registered by [ShapeConfigurator](../../src/component/mxgraph/config/ShapeConfigurator.ts).
which associates the `mxShape` name (used in style definition) with the `mxShape` class to be used.

For more details, see [BPMN Support - How To](./bpmn-support-how-to.md).
Expand Down Expand Up @@ -142,16 +142,16 @@ to see various positioning methods in action.
We are hacking mxCellOverlays which originally only supports image shape. This lets us use custom shapes.

Customization main points
- `MxGraphCustomOverlay`: add extra configuration and behavior to mxCellOverlay
- customized `mxCellRenderer`: change the overlays rendering code to transform `MxGraphCustomOverlay` into specific shapes
- [MxGraphCustomOverlay](../../src/component/mxgraph/overlay/custom-overlay.ts): add extra configuration and behavior to `mxCellOverlay`.
- [BpmnCellRenderer](../../src/component/mxgraph/BpmnCellRenderer.ts) (customized `mxCellRenderer`): change the overlays rendering code to transform `MxGraphCustomOverlay` into specific shapes
according to its configuration.

More details are available in [#955](https://github.com/process-analytics/bpmn-visualization-js/issues/955).


## Custom CSS classes added to svg node generated by mxGraph
## Custom CSS classes added to SVG node generated by mxGraph

In `ShapeConfigurator`, we customize the mxShape rendering code to add extra CSS classes depending on BPMN Element kinds.
It allows styling to be managed with external CSS classes and it is also used for element identification and selection.
In [BpmnCellRenderer](../../src/component/mxgraph/BpmnCellRenderer.ts), we customize the `mxShape` rendering code to add extra CSS classes depending on BPMN Element kinds.
It allows styling to be managed with external CSS classes, and it is also used for element identification and selection.

More details are available in [#942](https://github.com/process-analytics/bpmn-visualization-js/issues/942).

0 comments on commit e4ec2ba

Please sign in to comment.