Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/typescript-bdaf0f2ef2
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information
tbouffard committed Aug 12, 2024
2 parents 01fbf25 + eee7809 commit 6e2cc78
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 287 deletions.
4 changes: 2 additions & 2 deletions .github/actions/custom-surge-preview/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
id: surge-preview-tools
with:
surge-token: ${{ inputs.surge-token }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event.action != 'closed'
- name: Build Setup
uses: ./.github/actions/build-setup
Expand All @@ -46,7 +46,7 @@ runs:
# Fallback when it is not possible to deploy to surge
- name: Upload artifact (preview not deployed)
if: github.event.action != 'closed' && steps.surge-preview-tools.outputs.can-run-surge-command == 'false'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}-${{github.sha}}
path: ${{ inputs.build-preview-dist }}
2 changes: 1 addition & 1 deletion dev/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>bpmn-visualization - Demo</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css" integrity="sha256-XOqroi11tY4EFQMR9ZYwZWKj5ZXiftSx36RRuC3anlA=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/all.min.css" integrity="sha256-5eIC48iZUHmSlSUz9XtjRyK2mzQkHScZY1WdMaoz74E=" crossorigin="anonymous">
<link href="./static/css/styles.css" rel="stylesheet">
<link rel="icon" type="image/svg+xml" href="./static/img/favicon.svg">
<script src="../ts/pages/index.ts" type="module"></script>
Expand Down
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).
Loading

0 comments on commit 6e2cc78

Please sign in to comment.