@rxap/icon 21.0.1 → 22.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/compodoc/architecture.html +222 -0
- package/compodoc/changelog.html +61 -5
- package/compodoc/dependencies.html +96 -21
- package/compodoc/index.html +46 -5
- package/compodoc/injectables/IconLoaderService.html +78 -18
- package/compodoc/js/architecture-graph.js +288 -0
- package/compodoc/js/libs/bootstrap-native.js +4 -2
- package/compodoc/js/libs/jszip.min.js +13 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -3
- package/compodoc/js/libs/tablesort.min.js +3 -3
- package/compodoc/js/libs/tablesort.number.min.js +3 -3
- package/compodoc/js/libs/vis-network.min.js +78 -0
- package/compodoc/js/menu-wc.js +25 -12
- package/compodoc/js/menu.js +10 -11
- package/compodoc/js/routes/routes_index.js +1 -0
- package/compodoc/js/routes.js +142 -34
- package/compodoc/js/search/search-lunr.js +6 -8
- package/compodoc/js/search/search.js +118 -66
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/js/tabs.js +98 -15
- package/compodoc/js/tree.js +44 -7
- package/compodoc/license.html +48 -6
- package/compodoc/llms.txt +34 -0
- package/compodoc/miscellaneous/functions.html +58 -14
- package/compodoc/miscellaneous/variables.html +58 -5
- package/compodoc/modules.html +44 -3
- package/compodoc/overview.html +54 -3
- package/compodoc/properties.html +45 -4
- package/compodoc/routes.html +227 -0
- package/compodoc/styles/compodoc.css +365 -44
- package/compodoc/styles/dark.css +16 -0
- package/compodoc/template-playground/default-templates.json +192 -0
- package/compodoc/template-playground/hbs-render.service.ts +217 -0
- package/compodoc/template-playground/main.ts +9 -0
- package/compodoc/template-playground/template-editor.service.ts +173 -0
- package/compodoc/template-playground/template-playground.component.ts +614 -0
- package/compodoc/template-playground/template-playground.module.ts +29 -0
- package/compodoc/template-playground/zip-export.service.ts +86 -0
- package/compodoc/template-playground-app/app.js +1389 -0
- package/compodoc/template-playground-app/index.html +462 -0
- package/compodoc/todo.html +45 -56
- package/docs/documentation.json +60 -50
- package/docs/html/assets/highlight.css +1 -1
- package/docs/html/assets/icons.js +1 -1
- package/docs/html/assets/icons.svg +1 -1
- package/docs/html/assets/main.js +5 -5
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +265 -228
- package/docs/html/classes/IconLoaderService.html +79 -4
- package/docs/html/functions/DefaultIconSvgFilePath.html +38 -1
- package/docs/html/functions/LoadIconSetsFactory.html +44 -1
- package/docs/html/functions/ProvideIconAssetPath.html +42 -1
- package/docs/html/hierarchy.html +29 -0
- package/docs/html/index.html +40 -4
- package/docs/html/modules.html +44 -1
- package/docs/html/variables/RXAP_ICON_ASSET_PATH.html +33 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/IconLoaderService.md +7 -7
- package/docs/markdown/functions/DefaultIconSvgFilePath.md +2 -2
- package/docs/markdown/functions/LoadIconSetsFactory.md +4 -8
- package/docs/markdown/functions/ProvideIconAssetPath.md +4 -4
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/variables/RXAP_ICON_ASSET_PATH.md +2 -2
- package/docs/wiki/Class.IconLoaderService.md +6 -6
- package/docs/wiki/Function.DefaultIconSvgFilePath.md +1 -1
- package/docs/wiki/Function.LoadIconSetsFactory.md +3 -7
- package/docs/wiki/Function.ProvideIconAssetPath.md +3 -3
- package/docs/wiki/Variable.RXAP_ICON_ASSET_PATH.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-icon.mjs +72 -79
- package/fesm2022/rxap-icon.mjs.map +1 -1
- package/package.json +15 -15
- package/types/rxap-icon.d.ts +18 -20
|
@@ -61,6 +61,20 @@
|
|
|
61
61
|
}
|
|
62
62
|
toggleDarkMode(darkModeState);
|
|
63
63
|
</script>
|
|
64
|
+
<script>
|
|
65
|
+
// --- Iframe navigation tracking for Template Playground ---
|
|
66
|
+
function sendCurrentUrlToParent() {
|
|
67
|
+
if (window.parent && window.parent !== window) {
|
|
68
|
+
window.parent.postMessage({
|
|
69
|
+
type: 'compodoc-iframe-navigate',
|
|
70
|
+
url: window.location.pathname + window.location.hash
|
|
71
|
+
}, '*');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
window.addEventListener('hashchange', sendCurrentUrlToParent, false);
|
|
75
|
+
window.addEventListener('popstate', sendCurrentUrlToParent, false);
|
|
76
|
+
window.addEventListener('DOMContentLoaded', sendCurrentUrlToParent, false);
|
|
77
|
+
</script>
|
|
64
78
|
|
|
65
79
|
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
|
|
66
80
|
<div class="d-flex">
|
|
@@ -70,7 +84,14 @@
|
|
|
70
84
|
</div>
|
|
71
85
|
|
|
72
86
|
<div class="xs-menu menu" id="mobile-menu">
|
|
73
|
-
<div id="book-search-input" role="search"
|
|
87
|
+
<div id="book-search-input" role="search">
|
|
88
|
+
<input type="text" placeholder="Type to search">
|
|
89
|
+
<button type="button"
|
|
90
|
+
class="search-input-clear"
|
|
91
|
+
aria-label="Clear search"
|
|
92
|
+
data-search-input-clear>×</button>
|
|
93
|
+
</div>
|
|
94
|
+
<compodoc-menu></compodoc-menu>
|
|
74
95
|
</div>
|
|
75
96
|
|
|
76
97
|
<div class="container-fluid main">
|
|
@@ -89,6 +110,10 @@
|
|
|
89
110
|
|
|
90
111
|
|
|
91
112
|
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
92
117
|
<ol class="breadcrumb">
|
|
93
118
|
<li class="breadcrumb-item">Injectables</li>
|
|
94
119
|
<li class="breadcrumb-item"
|
|
@@ -96,6 +121,11 @@
|
|
|
96
121
|
>IconLoaderService</li>
|
|
97
122
|
</ol>
|
|
98
123
|
|
|
124
|
+
<div class="io-file io-file-path" data-compodoc="entity-file-path">
|
|
125
|
+
<span class="icon ion-ios-document" aria-hidden="true"></span>
|
|
126
|
+
<code>src/lib/icon-loader.service.ts</code>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
99
129
|
<ul class="nav nav-tabs" role="tablist">
|
|
100
130
|
<li class="nav-item">
|
|
101
131
|
<a href="#info"
|
|
@@ -103,6 +133,12 @@
|
|
|
103
133
|
class="nav-link active"
|
|
104
134
|
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
|
|
105
135
|
</li>
|
|
136
|
+
<li class="nav-item">
|
|
137
|
+
<a href="#api"
|
|
138
|
+
class="nav-link"
|
|
139
|
+
|
|
140
|
+
role="tab" id="api-tab" data-bs-toggle="tab" data-link="api">API</a>
|
|
141
|
+
</li>
|
|
106
142
|
<li class="nav-item">
|
|
107
143
|
<a href="#source"
|
|
108
144
|
class="nav-link"
|
|
@@ -113,13 +149,6 @@
|
|
|
113
149
|
|
|
114
150
|
<div class="tab-content">
|
|
115
151
|
<div class="tab-pane fade active in" id="info">
|
|
116
|
-
<p class="comment">
|
|
117
|
-
<h3>File</h3>
|
|
118
|
-
</p>
|
|
119
|
-
<p class="comment">
|
|
120
|
-
<code>src/lib/icon-loader.service.ts</code>
|
|
121
|
-
</p>
|
|
122
|
-
|
|
123
152
|
<p class="comment">
|
|
124
153
|
<h3 class="deprecated">Deprecated</h3>
|
|
125
154
|
</p>
|
|
@@ -129,34 +158,48 @@
|
|
|
129
158
|
|
|
130
159
|
|
|
131
160
|
|
|
161
|
+
<section data-compodoc="block-metadata">
|
|
162
|
+
<h3>Metadata</h3>
|
|
163
|
+
<table class="table table-sm table-hover metadata">
|
|
164
|
+
<tbody>
|
|
165
|
+
<tr>
|
|
166
|
+
<td class="col-md-3">providedIn</td>
|
|
167
|
+
<td class="col-md-9"><code>root</code></td>
|
|
168
|
+
</tr>
|
|
169
|
+
</tbody>
|
|
170
|
+
</table>
|
|
171
|
+
</section>
|
|
172
|
+
|
|
132
173
|
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<div class="tab-pane fade " id="api">
|
|
133
177
|
<section data-compodoc="block-index">
|
|
134
178
|
<h3 id="index">Index</h3>
|
|
135
|
-
<table class="table table-sm table-bordered index-table">
|
|
136
|
-
<tbody>
|
|
137
179
|
|
|
180
|
+
<table class="table table-sm table-bordered index-table">
|
|
181
|
+
<tbody>
|
|
138
182
|
<tr>
|
|
139
|
-
<td class="col-md-
|
|
183
|
+
<td class="col-md-3">
|
|
140
184
|
<h6><b>Methods</b></h6>
|
|
141
185
|
</td>
|
|
142
|
-
|
|
143
|
-
<tr>
|
|
144
|
-
<td class="col-md-4">
|
|
186
|
+
<td class="col-md-9">
|
|
145
187
|
<ul class="index-list">
|
|
146
188
|
<li>
|
|
189
|
+
<span class="reference-badge reference-badge--method" aria-hidden="true">M</span>
|
|
147
190
|
<span class="modifier">Public</span>
|
|
148
191
|
<a href="#load" >load</a>
|
|
149
192
|
</li>
|
|
150
193
|
</ul>
|
|
151
194
|
</td>
|
|
152
195
|
</tr>
|
|
196
|
+
</tbody>
|
|
197
|
+
</table>
|
|
153
198
|
|
|
154
199
|
|
|
155
200
|
|
|
156
201
|
|
|
157
202
|
|
|
158
|
-
</tbody>
|
|
159
|
-
</table>
|
|
160
203
|
</section>
|
|
161
204
|
|
|
162
205
|
|
|
@@ -206,6 +249,7 @@
|
|
|
206
249
|
</table>
|
|
207
250
|
</section>
|
|
208
251
|
|
|
252
|
+
|
|
209
253
|
</div>
|
|
210
254
|
|
|
211
255
|
|
|
@@ -294,6 +338,24 @@ export class IconLoaderService {
|
|
|
294
338
|
|
|
295
339
|
<script>
|
|
296
340
|
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
341
|
+
var updateDarkModeSwitchOffset = function () {
|
|
342
|
+
var content = document.querySelector('.content');
|
|
343
|
+
var scrollbarWidth = 0;
|
|
344
|
+
|
|
345
|
+
if (content) {
|
|
346
|
+
scrollbarWidth = Math.max(0, content.offsetWidth - content.clientWidth);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
document.documentElement.style.setProperty(
|
|
350
|
+
'--content-scrollbar-width',
|
|
351
|
+
scrollbarWidth + 'px'
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
updateDarkModeSwitchOffset();
|
|
356
|
+
requestAnimationFrame(updateDarkModeSwitchOffset);
|
|
357
|
+
window.addEventListener('resize', updateDarkModeSwitchOffset);
|
|
358
|
+
|
|
297
359
|
checkToggle(darkModeState);
|
|
298
360
|
if ($darkModeToggleSwitchers.length > 0) {
|
|
299
361
|
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
@@ -309,14 +371,12 @@ export class IconLoaderService {
|
|
|
309
371
|
<script src="../js/libs/lit-html.js"></script>
|
|
310
372
|
|
|
311
373
|
<script src="../js/menu-wc.js" defer></script>
|
|
312
|
-
<script nomodule src="../js/menu-wc_es5.js" defer></script>
|
|
313
374
|
|
|
314
375
|
<script src="../js/libs/bootstrap-native.js"></script>
|
|
315
376
|
|
|
316
377
|
<script src="../js/libs/es6-shim.min.js"></script>
|
|
317
378
|
<script src="../js/libs/EventDispatcher.js"></script>
|
|
318
379
|
<script src="../js/libs/promise.min.js"></script>
|
|
319
|
-
<script src="../js/libs/zepto.min.js"></script>
|
|
320
380
|
|
|
321
381
|
<script src="../js/compodoc.js"></script>
|
|
322
382
|
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
2
|
+
var container = document.getElementById("architecture-graph");
|
|
3
|
+
if (!container) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
if (
|
|
7
|
+
typeof ARCHITECTURE_DEP_GRAPH === "undefined" ||
|
|
8
|
+
!ARCHITECTURE_DEP_GRAPH ||
|
|
9
|
+
!ARCHITECTURE_DEP_GRAPH.nodes
|
|
10
|
+
) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (typeof vis === "undefined" || !vis.Network) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var typeColors = {
|
|
18
|
+
component: "#10b39c",
|
|
19
|
+
directive: "#6747dd",
|
|
20
|
+
pipe: "#de3b91",
|
|
21
|
+
module: "#2973f0",
|
|
22
|
+
injectable: "#b77006",
|
|
23
|
+
};
|
|
24
|
+
var isDarkMode = function () {
|
|
25
|
+
return !!(document.body && document.body.classList.contains("dark"));
|
|
26
|
+
};
|
|
27
|
+
var getNodeTextColor = function () {
|
|
28
|
+
return isDarkMode() ? "#f0f0f0" : "#2d2d2d";
|
|
29
|
+
};
|
|
30
|
+
var getEdgeColor = function () {
|
|
31
|
+
return isDarkMode() ? "#b5b5b5" : "#8b8b8b";
|
|
32
|
+
};
|
|
33
|
+
var getEdgeOpacity = function () {
|
|
34
|
+
return isDarkMode() ? 0.8 : 0.65;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var allNodes = ARCHITECTURE_DEP_GRAPH.nodes.map(function (node) {
|
|
38
|
+
return {
|
|
39
|
+
id: node.id,
|
|
40
|
+
label: node.name,
|
|
41
|
+
type: node.type,
|
|
42
|
+
url: node.url,
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
var allEdges = ARCHITECTURE_DEP_GRAPH.edges.map(function (edge) {
|
|
46
|
+
return {
|
|
47
|
+
from: edge.source,
|
|
48
|
+
to: edge.target,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (!allNodes.length || !allEdges.length) {
|
|
53
|
+
container.innerHTML =
|
|
54
|
+
'<p class="alert alert-warning">No dependency links to render.</p>';
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var degreeByNodeId = {};
|
|
59
|
+
allEdges.forEach(function (edge) {
|
|
60
|
+
degreeByNodeId[edge.from] = (degreeByNodeId[edge.from] || 0) + 1;
|
|
61
|
+
degreeByNodeId[edge.to] = (degreeByNodeId[edge.to] || 0) + 1;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
allNodes = allNodes.map(function (node) {
|
|
65
|
+
var degree = degreeByNodeId[node.id] || 1;
|
|
66
|
+
return {
|
|
67
|
+
id: node.id,
|
|
68
|
+
label: node.label,
|
|
69
|
+
title: node.label + " (" + node.type + ")",
|
|
70
|
+
type: node.type,
|
|
71
|
+
url: node.url,
|
|
72
|
+
color: typeColors[node.type] || typeColors.module,
|
|
73
|
+
size: Math.min(30, 10 + degree * 1.3),
|
|
74
|
+
font: { color: getNodeTextColor(), size: 12 },
|
|
75
|
+
borderWidth: 1,
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
var activeTypes = {};
|
|
80
|
+
var knownTypes = ["component", "directive", "pipe", "module", "injectable"];
|
|
81
|
+
knownTypes.forEach(function (type) {
|
|
82
|
+
activeTypes[type] = true;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var nodeById = {};
|
|
86
|
+
allNodes.forEach(function (node) {
|
|
87
|
+
nodeById[node.id] = node;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
var network;
|
|
91
|
+
var currentScale = 1;
|
|
92
|
+
|
|
93
|
+
var applyGraphTheme = function () {
|
|
94
|
+
var textColor = getNodeTextColor();
|
|
95
|
+
var edgeColor = getEdgeColor();
|
|
96
|
+
var edgeOpacity = getEdgeOpacity();
|
|
97
|
+
|
|
98
|
+
for (var i = 0; i < allNodes.length; i++) {
|
|
99
|
+
allNodes[i].font = allNodes[i].font || {};
|
|
100
|
+
allNodes[i].font.color = textColor;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (network) {
|
|
104
|
+
network.setOptions({
|
|
105
|
+
edges: {
|
|
106
|
+
color: { color: edgeColor, opacity: edgeOpacity },
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var getFilteredGraphData = function () {
|
|
113
|
+
var visibleNodes = allNodes.filter(function (node) {
|
|
114
|
+
return activeTypes[node.type];
|
|
115
|
+
});
|
|
116
|
+
var visibleNodeIds = {};
|
|
117
|
+
visibleNodes.forEach(function (node) {
|
|
118
|
+
visibleNodeIds[node.id] = true;
|
|
119
|
+
});
|
|
120
|
+
var visibleEdges = allEdges.filter(function (edge) {
|
|
121
|
+
return visibleNodeIds[edge.from] && visibleNodeIds[edge.to];
|
|
122
|
+
});
|
|
123
|
+
return { nodes: visibleNodes, edges: visibleEdges };
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var renderFilteredGraph = function () {
|
|
127
|
+
var filtered = getFilteredGraphData();
|
|
128
|
+
network.setData({
|
|
129
|
+
nodes: new vis.DataSet(filtered.nodes),
|
|
130
|
+
edges: new vis.DataSet(filtered.edges),
|
|
131
|
+
});
|
|
132
|
+
network.stabilize(120);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var options = {
|
|
136
|
+
autoResize: true,
|
|
137
|
+
layout: {
|
|
138
|
+
improvedLayout: true,
|
|
139
|
+
},
|
|
140
|
+
interaction: {
|
|
141
|
+
hover: true,
|
|
142
|
+
dragView: true,
|
|
143
|
+
zoomView: true,
|
|
144
|
+
},
|
|
145
|
+
physics: {
|
|
146
|
+
enabled: true,
|
|
147
|
+
stabilization: {
|
|
148
|
+
enabled: true,
|
|
149
|
+
iterations: 180,
|
|
150
|
+
fit: true,
|
|
151
|
+
},
|
|
152
|
+
barnesHut: {
|
|
153
|
+
gravitationalConstant: -6000,
|
|
154
|
+
centralGravity: 0.35,
|
|
155
|
+
springLength: 130,
|
|
156
|
+
springConstant: 0.02,
|
|
157
|
+
damping: 0.2,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
edges: {
|
|
161
|
+
arrows: { to: { enabled: true, scaleFactor: 0.6 } },
|
|
162
|
+
color: { color: getEdgeColor(), opacity: getEdgeOpacity() },
|
|
163
|
+
smooth: {
|
|
164
|
+
enabled: true,
|
|
165
|
+
type: "dynamic",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
nodes: {
|
|
169
|
+
shape: "dot",
|
|
170
|
+
scaling: {
|
|
171
|
+
min: 9,
|
|
172
|
+
max: 32,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
var initialData = getFilteredGraphData();
|
|
178
|
+
network = new vis.Network(
|
|
179
|
+
container,
|
|
180
|
+
{
|
|
181
|
+
nodes: new vis.DataSet(initialData.nodes),
|
|
182
|
+
edges: new vis.DataSet(initialData.edges),
|
|
183
|
+
},
|
|
184
|
+
options,
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
network.on("click", function (params) {
|
|
188
|
+
if (!params.nodes || params.nodes.length === 0) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
var node = nodeById[params.nodes[0]];
|
|
192
|
+
if (node && node.url) {
|
|
193
|
+
document.location.href = node.url;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
network.once("stabilizationIterationsDone", function () {
|
|
198
|
+
network.fit({ animation: { duration: 250, easingFunction: "easeOutQuad" } });
|
|
199
|
+
currentScale = 1;
|
|
200
|
+
});
|
|
201
|
+
applyGraphTheme();
|
|
202
|
+
|
|
203
|
+
var legendButtons = document.querySelectorAll("[data-architecture-filter]");
|
|
204
|
+
var updateLegendState = function () {
|
|
205
|
+
for (var i = 0; i < legendButtons.length; i++) {
|
|
206
|
+
var button = legendButtons[i];
|
|
207
|
+
var type = button.getAttribute("data-architecture-filter");
|
|
208
|
+
var active = !!activeTypes[type];
|
|
209
|
+
button.setAttribute("aria-pressed", active ? "true" : "false");
|
|
210
|
+
if (active) {
|
|
211
|
+
button.classList.remove("is-disabled");
|
|
212
|
+
} else {
|
|
213
|
+
button.classList.add("is-disabled");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
for (var i = 0; i < legendButtons.length; i++) {
|
|
219
|
+
legendButtons[i].addEventListener("click", function (event) {
|
|
220
|
+
event.preventDefault();
|
|
221
|
+
var type = this.getAttribute("data-architecture-filter");
|
|
222
|
+
if (!type) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
activeTypes[type] = !activeTypes[type];
|
|
227
|
+
|
|
228
|
+
var activeCount = 0;
|
|
229
|
+
knownTypes.forEach(function (entry) {
|
|
230
|
+
if (activeTypes[entry]) {
|
|
231
|
+
activeCount += 1;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
if (activeCount === 0) {
|
|
235
|
+
knownTypes.forEach(function (entry) {
|
|
236
|
+
activeTypes[entry] = true;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
updateLegendState();
|
|
241
|
+
renderFilteredGraph();
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
updateLegendState();
|
|
245
|
+
|
|
246
|
+
var zoomIn = document.getElementById("architecture-zoom-in");
|
|
247
|
+
var zoomOut = document.getElementById("architecture-zoom-out");
|
|
248
|
+
var reset = document.getElementById("architecture-reset");
|
|
249
|
+
|
|
250
|
+
if (zoomIn) {
|
|
251
|
+
zoomIn.addEventListener("click", function (ev) {
|
|
252
|
+
ev.preventDefault();
|
|
253
|
+
currentScale = Math.min(4, currentScale * 1.25);
|
|
254
|
+
network.moveTo({
|
|
255
|
+
scale: currentScale,
|
|
256
|
+
animation: { duration: 160, easingFunction: "easeOutQuad" },
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
if (zoomOut) {
|
|
261
|
+
zoomOut.addEventListener("click", function (ev) {
|
|
262
|
+
ev.preventDefault();
|
|
263
|
+
currentScale = Math.max(0.2, currentScale / 1.25);
|
|
264
|
+
network.moveTo({
|
|
265
|
+
scale: currentScale,
|
|
266
|
+
animation: { duration: 160, easingFunction: "easeOutQuad" },
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
if (reset) {
|
|
271
|
+
reset.addEventListener("click", function (ev) {
|
|
272
|
+
ev.preventDefault();
|
|
273
|
+
network.fit({ animation: { duration: 180, easingFunction: "easeOutQuad" } });
|
|
274
|
+
currentScale = 1;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (window.MutationObserver && document.body) {
|
|
279
|
+
var bodyThemeObserver = new MutationObserver(function () {
|
|
280
|
+
applyGraphTheme();
|
|
281
|
+
renderFilteredGraph();
|
|
282
|
+
});
|
|
283
|
+
bodyThemeObserver.observe(document.body, {
|
|
284
|
+
attributes: true,
|
|
285
|
+
attributeFilter: ["class"],
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
});
|