forked from process-analytics/bpmn-visualization-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (134 loc) · 6.99 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
<!--
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 - Diagram Navigation</title>
<link rel="icon" href="../../favicon.png">
<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 {
/* use absolute values for height to ensure that the vertical diagram is not fully displayed when the page is opened. */
/* width is relative to the window size */
height: 500px;
margin-top: 1.5em;
border-style: solid;
border-color: #B0B0B0;
border-width: 1px;
/* This ensures that the parts of the diagram outside of the container are not displayed. */
overflow: hidden;
}
#controls {
margin-top: 1em;
}
#dropdown-fit-margin {
min-width: 60px;
max-height: 200px;
}
.custom-dropdown li {
margin-top: 0;
text-align: right;
}
#fit-margin-value {
float: left;
padding-top: 0.3em;
}
.hidden {
display: none !important;
}
</style>
<script defer src="../../static/js/link-to-sources.js"></script>
<!-- load bpmn-visualization -->
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bpmn-visualization.min.js"></script>
<script defer src="../../static/js/diagram/bpmn-diagrams.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>Various fit after load</h2>
<p>
If the diagram is too large, it does not fit within the container. <br>
Use the buttons below so that the diagram fits the container horizontally, vertically or in the center, after load.
</p>
<div id="controls">
<div id="btn-group-fit" class="col-2" style="float: left">
<button id="btn-fit-none" title="Reset to initial loading dimensions" class="btn btn-primary has-icon-right">
<span class="icon icon-refresh mb-1"></span>
</button>
<button id="btn-fit-horizontally" title="Fit horizontally" class="btn btn-primary has-icon-right">
<span class="icon icon-resize-horiz mb-1"></span>
</button>
<button id="btn-fit-vertically" title="Fit vertically" class="btn btn-primary has-icon-right">
<span class="icon icon-resize-vert mb-1"></span>
</button>
<button id="btn-fit-all" title="Fit both horizontally and vertically" class="btn btn-primary has-icon-right">
<span class="icon icon-apps mb-1"></span>
</button>
<button id="btn-fit-center" title="Fit center" class="btn btn-primary has-icon-right">
<span class="icon icon-location mb-1"></span>
</button>
</div>
<div class="col-3" style="float: left">
<div class="dropdown dropdown-right mr-2" style="float: left">
<a id="toggle-dropdown-fit-margin" href="#" class="btn dropdown-toggle" tabindex="0" title="Margin between the diagram and the container">
Fit margin <span class="icon icon-caret icon-in-the-middle"></span>
</a>
<ul class="menu custom-dropdown" id="dropdown-fit-margin">
</ul>
</div>
<div id="loading-info">
<span id="fit-margin-value"></span>
</div>
</div>
<div class="col-3" style="float: left">
<div class="dropdown dropdown-right" style="float: right">
<a id="toggle-dropdown-diagram-choice" href="#" class="btn btn-primary dropdown-toggle" tabindex="0" style="background: black">
Select a BPMN Diagram <span class="icon icon-caret icon-in-the-middle"></span>
</a>
<ul class="menu custom-dropdown" id="dropdown-diagram-choice">
<li><a href="#" class="btn btn-link">horizontal diagram</a></li>
<li><a href="#" class="btn btn-link">vertical diagram</a></li>
</ul>
</div>
</div>
</div>
<div id="bpmn-container" class="col-8" style="float: left"></div>
</div>
</section>
</section>
</body>
</html>