From 38d2af0df158b2eae22b8f85a175cd983f023d4c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sat, 1 Aug 2020 19:27:39 +0200 Subject: [PATCH] feat(example): custom user task icon custom user task icon for the 0.1.5 version display default and custom icon implementation --- README.md | 7 + examples/custom-user-task-icon/README.md | 9 ++ examples/custom-user-task-icon/index.html | 151 ++++++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 examples/custom-user-task-icon/README.md create mode 100644 examples/custom-user-task-icon/index.html diff --git a/README.md b/README.md index fd8f64a2..51fbbacd 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,13 @@ If you need BPMN examples, you can use resources - https://github.com/bpmn-miwg/bpmn-miwg-demos - [files used to test](./bpmn-files/README.md) how the lib renders BPMN elements +## Examples + + +### Extensibility +- [custom user task icon](./examples/custom-user-task-icon/README.md): use your own icon + + # Powered by [![statically.io logo](https://statically.io/icons/icon-96x96.png "statically.io")](https://statically.io) diff --git a/examples/custom-user-task-icon/README.md b/examples/custom-user-task-icon/README.md new file mode 100644 index 00000000..2987e19d --- /dev/null +++ b/examples/custom-user-task-icon/README.md @@ -0,0 +1,9 @@ +# Custom user task icon + +**DISCLAIMER: this extension point is very experimental and is subject to changes** + +Javascript example provided for `bpmn-visualization@0.1.5`, [index.html](./index.html) or [live](https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/master/examples/custom-user-task-icon/index.html) + +Override the `IconPainter` static method related to the icon of the BPMN element and paint the icon using the mxGraph + API. See https://process-analytics.github.io/bpmn-visualization-js/#bpmn-support-howto-elements-rendering for more +information. diff --git a/examples/custom-user-task-icon/index.html b/examples/custom-user-task-icon/index.html new file mode 100644 index 00000000..f1969988 --- /dev/null +++ b/examples/custom-user-task-icon/index.html @@ -0,0 +1,151 @@ + + + +
+ +