-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
158 lines (150 loc) · 7.38 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!--
Copyright 2020 Bonitasoft S.A.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>bpmn-visualization - Apply specific CSS classes</title>
<link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="stylesheet" href="../../static/css/spectre.min.css" type="text/css">
<link rel="stylesheet" href="../../static/css/icons.min.css" type="text/css">
<link rel="stylesheet" href="../../static/css/main.css" type="text/css">
<style>
#bpmn-container {
left: 60px;
right: 60px;
/*TODO find a way to ensure it takes the whole available height*/
/*height: 70%;*/
height: 600px;
margin-top: 2em;
border-style: solid;
border-color: #B0B0B0;
border-width: 1px;
/* this ensures that the part of the diagram outside of the container is not displayed. */
overflow: hidden;
}
:root {
--color-highlight: #2c623c;
}
.bpmn-type-activity.highlight-info > rect {
fill: blue !important;
fill-opacity: 30% !important;
stroke: blue;
}
.bpmn-type-activity.highlight-success > rect {
fill: green !important;
fill-opacity: 15% !important;
stroke: green;
}
.bpmn-type-activity.highlight-error > rect {
fill: red !important;
fill-opacity: 20% !important;
stroke: red;
}
.bpmn-type-activity.highlight-in-progress > rect {
fill: var(--color-highlight) !important;
fill-opacity: 40% !important;
}
.bpmn-type-gateway.highlight-warning > path:nth-child(1) {
fill: yellow !important;
fill-opacity: 30% !important;
stroke: orange;
stroke-width: 4px;
}
/* edge arrow */
.bpmn-sequence-flow.highlight-path > path:nth-child(3) {
fill: var(--color-highlight);
}
/* edge arrow */
.bpmn-sequence-flow.highlight-path > path:nth-child(3),
/* edge line */
.bpmn-sequence-flow.highlight-path > path:nth-child(2),
/* activity */
.bpmn-type-activity.highlight-path > rect,
/* gateway */
.bpmn-type-gateway.highlight-path > path:nth-child(1),
/* event */
.bpmn-type-event.highlight-path > ellipse {
filter: blur(1.5px); /* may not work on Safari */
stroke: var(--color-highlight);
stroke-width: 7px;
}
</style>
<script defer src="../../static/js/link-to-sources.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bpmn-visualization.min.js" integrity="sha384-1M4qFwJlwvJDbw5MlffvebCTw2MD5c6kEjk3bgKPEdd5HMEGIMVxR+MR9twnWkKr" crossorigin="anonymous"></script>
<script defer src="../../static/js/diagram/bpmn-diagram-miwg-test-suite-c_1_1.js"></script>
<script defer src="index.js"></script>
</head>
<body>
<header class="navbar bg-dark p-2">
<section class="navbar-section ml-2">
<a class="home" href="../../index.html">
<img src="../../static/img/logo_64x64_white.png" alt="logo" class="logo">
<span class="h3 text-light ml-2 lib-name-text">bpmn-visualization examples</span>
</a>
</section>
<section class="navbar-section">
<a href="https://process-analytics.github.io/bpmn-visualization-js/" class="mr-2 btn btn-secondary">Docs</a>
<div class="dropdown mr-2">
<a href="#" class="btn btn-primary dropdown-toggle" tabindex="0">
GitHub <span class="icon icon-caret icon-in-the-middle"></span>
</a>
<ul class="menu">
<li><a href="https://github.com/process-analytics/bpmn-visualization-js" class="mr-2 btn btn-link">Library</a></li>
<li><a href="https://github.com/process-analytics/bpmn-visualization-examples" class="mr-2 btn btn-link">Examples</a></li>
</ul>
</div>
</section>
</header>
<section class="container col-10 flex-centered mt-2">
<section class="col-12 mt-2">
<div class="col-12 mb-2">
<h2>Apply css classes</h2>
Highlight elements and paths on demand on the <a href="https://github.com/bpmn-miwg/bpmn-miwg-test-suite/blob/master/Reference/C.1.1.bpmn" target="_blank">miwg-test-suite C.1.1</a> BPMN diagram.
</div>
<div id="controls" style="margin-top: 25px">
<div id="btn-group-general" class="col-2 float-left">
<button id="btn-reset" title="Reset applied styles" class="bg-dark btn btn-primary has-icon-right">
<span>Reset </span><span class="icon icon-refresh mb-1"></span>
</button>
<button id="btn-clear" title="Clear all applied styles" class="bg-dark btn btn-primary has-icon-right">
<span>Clear </span><span class="icon icon-delete mb-1"></span>
</button>
</div>
<div id="btn-group-styles" class="col-5 float-left">
<button id="btn-info" title="Toggle info styles" class="btn btn-primary has-icon-right">
<span>Info </span><span class="icon icon-message mb-1"></span>
</button>
<button id="btn-success" title="Add success styles" class="bg-success btn btn-primary has-icon-right">
<span>Success </span><span class="icon icon-check mb-1"></span>
</button>
<button id="btn-warning" title="Remove warning styles" class="bg-warning btn btn-primary has-icon-right">
<span>Warning </span><span class="icon icon-flag mb-1"></span>
</button>
<button id="btn-error" title="Add error styles" class="bg-error btn btn-primary has-icon-right">
<span>Error </span><span class="icon icon-stop mb-1"></span>
</button>
</div>
<div id="btn-group-paths" class="col-4 float-left">
<button id="btn-path" title="Toggle path highlighting " class="btn btn-primary has-icon-right">
<span>Highlight path/trace </span><span class="icon icon-message mb-1"></span>
</button>
<label class="ml-2" title="If checked, highlight the path step by step from the start to the in-progress activity"><input type="checkbox" id="chk-path-step" name="chk-path-step"> Step-by-step highlight</label>
</div>
</div>
</section>
</section>
<section class="col-11 mt-2 relative">
<div id="bpmn-container"></div>
</section>
</body>
</html>