You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: configure IconPainter via constructor options (#3419)
Remove IconPainterProvider singleton.
Users must now pass custom IconPainter through renderer options in BpmnVisualization constructor.
BREAKING CHANGE: `IconPainterProvider` removed. Use the `renderer.iconPainter` option instead.
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,6 @@ Please check the [__⏩ live environment__](https://cdn.statically.io/gh/process
49
49
You will find their basic usage as well as detailed examples showing possible rendering customizations.
50
50
51
51
52
-
## 📂 Repository Structure
53
-
54
-
The [dev](./dev) directory contains the source code for the **Load and Navigation demo** showcased on the [example site](https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/master/examples/index.html). \
55
-
This demo is also used for the PR previews of this repository.
56
-
57
-
58
52
## 🔆 Project Status
59
53
60
54
`bpmn-visualization` is actively developed and maintained.
@@ -192,6 +186,15 @@ The User documentation (with the feature list & the public API) is available in
192
186
For more technical details and how-to, go to the `bpmn-visualization-examples`[repository](https://github.com/process-analytics/bpmn-visualization-examples/).
193
187
194
188
189
+
## 🚀 Repository Demo
190
+
191
+
This repository includes a **Load and Navigation demo** located in the [dev](./dev) directory, which is also featured on the [example site](https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/master/examples/index.html) and used for PR previews.
192
+
193
+
The demo supports customization through URL query parameters. For instance, you can set a specific theme by passing `style.theme=light-blue`, or enable a custom icon painter with `renderer.iconPainter.use.custom=true`.
194
+
195
+
For a complete list of configuration options, refer to the [source code](./dev/ts/shared/main.ts).
196
+
197
+
195
198
## 🔧 Contributing
196
199
197
200
To contribute to `bpmn-visualization`, fork and clone this repository locally and commit your code on a separate branch.
// Taken from https://github.com/process-analytics/bpmn-visualization-examples/blob/v0.47.0/examples/custom-bpmn-theme/custom-user-task-icon/index.js#L9
22
+
// The only difference is the fill color of the icon, which is not set here, to let the theme define it.
23
+
exportclassCustomIconPainterextendsIconPainter{
24
+
// adapted from https://github.com/primer/octicons/blob/638c6683c96ec4b357576c7897be8f19c933c052/icons/person.svg
25
+
// use mxgraph-svg2shape to generate the code from the svg
Copy file name to clipboardExpand all lines: src/component/mxgraph/shape/render/icon-painter.ts
-19Lines changed: 0 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -940,22 +940,3 @@ function paintGearInnerCircle(canvas: BpmnCanvas, arcStartX: number, arcStartY:
940
940
canvas.close();
941
941
canvas.fillAndStroke();
942
942
}
943
-
944
-
/**
945
-
* Hold the instance of {@link IconPainter} used by the BPMN Theme.
946
-
*
947
-
* **WARN**: You may use it to customize the BPMN Theme as suggested in the examples. But be aware that the way the default BPMN theme can be modified is subject to change.
Copy file name to clipboardExpand all lines: src/component/mxgraph/shape/render/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,4 +17,4 @@ limitations under the License.
17
17
// export types first, otherwise typedoc doesn't generate the subsequent doc correctly (no category and uses the file header instead of the actual TSDoc)
0 commit comments