pyegeria 5.3.4.13__py3-none-any.whl → 5.3.4.14__py3-none-any.whl
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.
- pyegeria/mermaid_utilities.py +219 -71
- pyegeria/test_m.html +101 -72
- {pyegeria-5.3.4.13.dist-info → pyegeria-5.3.4.14.dist-info}/METADATA +1 -1
- {pyegeria-5.3.4.13.dist-info → pyegeria-5.3.4.14.dist-info}/RECORD +7 -7
- {pyegeria-5.3.4.13.dist-info → pyegeria-5.3.4.14.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.4.13.dist-info → pyegeria-5.3.4.14.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.4.13.dist-info → pyegeria-5.3.4.14.dist-info}/entry_points.txt +0 -0
pyegeria/mermaid_utilities.py
CHANGED
@@ -226,124 +226,272 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
226
226
|
graph_id = f"mermaid-graph-{guid}"
|
227
227
|
escaped_header = html.escape(title_label) if title_label else "" # Sanitize the header safely
|
228
228
|
escaped_mermaid_code = html.escape(mermaid_code)
|
229
|
+
header_html = f"""
|
230
|
+
<h3 id="{graph_id}-heading" style="margin: 20px 0; font-size: 1.5em; text-align: center;">
|
231
|
+
{escaped_header}
|
232
|
+
</h3>
|
233
|
+
<p id="{graph_id}-subheading" style="margin: 0; padding: 5px; font-size: 1em; text-align: center; color: gray; flex: 0 0 auto;">
|
234
|
+
GUID: {guid}
|
235
|
+
</p>
|
236
|
+
""" if title_label else ""
|
229
237
|
|
230
238
|
html_content = f"""
|
231
|
-
<style>
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<div id="{graph_id}" class="
|
268
|
-
|
239
|
+
<style>
|
240
|
+
/* Style the diagram container */
|
241
|
+
.diagram-container {{
|
242
|
+
position: relative;
|
243
|
+
width: 90%; /* Adjust container width */
|
244
|
+
height: 500px; /* Fixed height */
|
245
|
+
margin: 0 auto;
|
246
|
+
border: 1px solid #ccc;
|
247
|
+
overflow: hidden; /* Prevents content overflow */
|
248
|
+
}}
|
249
|
+
|
250
|
+
/* Style custom zoom controls */
|
251
|
+
.svg-pan-zoom-controls {{
|
252
|
+
position: absolute;
|
253
|
+
top: 10px;
|
254
|
+
right: 10px;
|
255
|
+
display: flex;
|
256
|
+
flex-direction: column;
|
257
|
+
gap: 5px;
|
258
|
+
z-index: 10; /* Ensures controls are above other elements */
|
259
|
+
}}
|
260
|
+
|
261
|
+
.svg-pan-zoom-controls button {{
|
262
|
+
background-color: #007bff;
|
263
|
+
color: white;
|
264
|
+
border: none;
|
265
|
+
padding: 5px 10px;
|
266
|
+
border-radius: 3px;
|
267
|
+
cursor: pointer;
|
268
|
+
font-size: 14px;
|
269
|
+
}}
|
270
|
+
.svg-pan-zoom-controls button:hover {{
|
271
|
+
background-color: #0056b3;
|
272
|
+
}}
|
273
|
+
</style>
|
274
|
+
|
275
|
+
<div id="{graph_id}-container" class="diagram-container">
|
276
|
+
<!-- Title/Heading (optional; include as needed) -->
|
277
|
+
{header_html}
|
278
|
+
<!-- Mermaid rendering area -->
|
279
|
+
<div id="{graph_id}" class="mermaid">
|
280
|
+
{mermaid_code}
|
281
|
+
</div>
|
269
282
|
</div>
|
270
|
-
</div>
|
271
283
|
|
272
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
284
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
273
285
|
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
286
|
+
|
274
287
|
<script>
|
275
|
-
|
276
|
-
// Initialize Mermaid and Pan-Zoom functionality
|
288
|
+
(function() {{
|
277
289
|
const graph_id = "{graph_id}";
|
290
|
+
let panZoomInstance; // Store reference to the panZoom instance
|
278
291
|
|
292
|
+
// Function to initialize Mermaid
|
279
293
|
function initializeMermaid(graph_id) {{
|
280
|
-
const
|
281
|
-
|
282
|
-
|
283
|
-
|
294
|
+
const container = document.getElementById(`${{graph_id}}-container`);
|
295
|
+
const diagram = document.getElementById(`${{graph_id}}`);
|
296
|
+
|
297
|
+
if (!container || !diagram) {{
|
298
|
+
console.error(`Container or diagram not found for ID "${{graph_id}}"`);
|
284
299
|
return;
|
285
300
|
}}
|
286
301
|
|
287
|
-
//
|
288
|
-
mermaid.initialize({{ startOnLoad: false
|
289
|
-
mermaid.init(undefined,
|
302
|
+
// Initialize Mermaid
|
303
|
+
mermaid.initialize({{ startOnLoad: false }});
|
304
|
+
mermaid.init(undefined, diagram);
|
290
305
|
|
306
|
+
// Set a small delay to allow Mermaid rendering to complete before initializing Pan-Zoom
|
291
307
|
setTimeout(() => {{
|
292
|
-
const svg =
|
308
|
+
const svg = container.querySelector("svg");
|
293
309
|
if (!svg) {{
|
294
|
-
console.error(`SVG not
|
310
|
+
console.error(`SVG not found for graph ID "${{graph_id}}"`);
|
295
311
|
return;
|
296
312
|
}}
|
297
313
|
|
298
|
-
//
|
314
|
+
// Force the SVG to fit the container by setting width, height, and viewBox
|
299
315
|
svg.setAttribute("width", "100%");
|
300
316
|
svg.setAttribute("height", "100%");
|
317
|
+
svg.setAttribute("preserveAspectRatio", "xMidYMid meet");
|
318
|
+
svg.style.display = "block";
|
301
319
|
|
302
|
-
|
303
|
-
|
320
|
+
if (!svg.hasAttribute("viewBox")) {{
|
321
|
+
const bbox = svg.getBBox();
|
322
|
+
svg.setAttribute("viewBox", `0 0 ${{bbox.width}} ${{bbox.height}}`);
|
323
|
+
}}
|
324
|
+
|
325
|
+
// Initialize Pan-Zoom functionality
|
326
|
+
panZoomInstance = svgPanZoom(svg, {{
|
304
327
|
zoomEnabled: true,
|
305
|
-
controlIconsEnabled: false,
|
328
|
+
controlIconsEnabled: false, // Use custom controls
|
306
329
|
fit: true,
|
307
330
|
center: true,
|
331
|
+
contain: true,
|
308
332
|
minZoom: 0.5,
|
309
|
-
maxZoom: 10
|
310
|
-
contain: true
|
333
|
+
maxZoom: 10
|
311
334
|
}});
|
312
335
|
|
313
336
|
// Add custom controls
|
314
337
|
const controlsContainer = document.createElement("div");
|
315
|
-
controlsContainer.className = "svg-pan-
|
338
|
+
controlsContainer.className = "svg-pan-zoom-controls";
|
316
339
|
controlsContainer.innerHTML = `
|
317
|
-
<button id="${{graph_id}}-zoom-in">+</button>
|
318
|
-
<button id="${{graph_id}}-zoom-out">-</button>
|
319
|
-
<button id="${{graph_id}}-reset">Reset</button>
|
340
|
+
<button type="button" id="${{graph_id}}-zoom-in">+</button>
|
341
|
+
<button type="button" id="${{graph_id}}-zoom-out">-</button>
|
342
|
+
<button type="button" id="${{graph_id}}-reset">Reset</button>
|
320
343
|
`;
|
321
|
-
|
344
|
+
container.appendChild(controlsContainer);
|
322
345
|
|
323
|
-
//
|
324
|
-
document.getElementById(`${{graph_id}}-zoom-in`).addEventListener("click", () =>
|
325
|
-
|
346
|
+
// Add event listeners for the controls
|
347
|
+
document.getElementById(`${{graph_id}}-zoom-in`).addEventListener("click", () => {{
|
348
|
+
if (panZoomInstance) panZoomInstance.zoomIn();
|
349
|
+
}});
|
350
|
+
document.getElementById(`${{graph_id}}-zoom-out`).addEventListener("click", () => {{
|
351
|
+
if (panZoomInstance) panZoomInstance.zoomOut();
|
352
|
+
}});
|
326
353
|
document.getElementById(`${{graph_id}}-reset`).addEventListener("click", () => {{
|
327
|
-
|
328
|
-
|
354
|
+
if (panZoomInstance) {{
|
355
|
+
panZoomInstance.resetZoom();
|
356
|
+
panZoomInstance.center();
|
357
|
+
}}
|
329
358
|
}});
|
330
|
-
}}, 500);
|
359
|
+
}}, 500); // Delay of 500ms for Mermaid and SVG rendering
|
331
360
|
}}
|
332
361
|
|
362
|
+
// Load Mermaid.js if not already loaded
|
333
363
|
if (typeof mermaid === "undefined") {{
|
334
|
-
const script = document.createElement(
|
364
|
+
const script = document.createElement("script");
|
335
365
|
script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
336
366
|
script.onload = () => initializeMermaid(graph_id);
|
337
367
|
document.head.appendChild(script);
|
338
368
|
}} else {{
|
339
369
|
initializeMermaid(graph_id);
|
340
370
|
}}
|
341
|
-
}});
|
371
|
+
}})();
|
342
372
|
</script>
|
373
|
+
"""
|
343
374
|
|
344
|
-
"""
|
345
375
|
|
346
376
|
return html_content
|
377
|
+
|
378
|
+
# html_content = f"""
|
379
|
+
# <style>
|
380
|
+
# /* Style for the diagram container */
|
381
|
+
# .diagram-container {{
|
382
|
+
# position: relative;
|
383
|
+
# width: 100%; /* Adjust the diagram container width */
|
384
|
+
# height: 500px; /* Set a fixed height for the container */
|
385
|
+
# margin: 0 auto;
|
386
|
+
# border: 1px solid #ccc; /* Optional border for visualization */
|
387
|
+
# overflow: hidden; /* Prevent content overflow outside the container */
|
388
|
+
# }}
|
389
|
+
#
|
390
|
+
# /* Style for zoom controls */
|
391
|
+
# .svg-pan-zoom_controls {{
|
392
|
+
# position: absolute;
|
393
|
+
# top: 10px;
|
394
|
+
# right: 10px;
|
395
|
+
# display: flex;
|
396
|
+
# flex-direction: column;
|
397
|
+
# gap: 5px;
|
398
|
+
# }}
|
399
|
+
# .svg-pan-zoom_controls button {{
|
400
|
+
# background-color: #007bff;
|
401
|
+
# color: white;
|
402
|
+
# border: none;
|
403
|
+
# padding: 5px 10px;
|
404
|
+
# border-radius: 3px;
|
405
|
+
# cursor: pointer;
|
406
|
+
# font-size: 14px;
|
407
|
+
# }}
|
408
|
+
# .svg-pan-zoom_controls button:hover {{
|
409
|
+
# background-color: #0056b3;
|
410
|
+
# }}
|
411
|
+
# </style>
|
412
|
+
#
|
413
|
+
# <div id="{graph_id}-container" class="diagram-container">
|
414
|
+
# <!-- Mermaid diagram will be dynamically rendered here -->
|
415
|
+
# <div id="{graph_id}" class="mermaid">
|
416
|
+
# {mermaid_code}
|
417
|
+
# </div>
|
418
|
+
# </div>
|
419
|
+
#
|
420
|
+
# <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
421
|
+
# <script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
422
|
+
# <script>
|
423
|
+
# document.addEventListener("DOMContentLoaded", () => {{
|
424
|
+
# // Initialize Mermaid and Pan-Zoom functionality
|
425
|
+
# const graph_id = "{graph_id}";
|
426
|
+
#
|
427
|
+
# function initializeMermaid(graph_id) {{
|
428
|
+
# const containerElement = document.getElementById(`${{graph_id}}-container`);
|
429
|
+
#
|
430
|
+
# if (!containerElement) {{
|
431
|
+
# console.error(`Container with ID "${{graph_id}}-container" not found.`);
|
432
|
+
# return;
|
433
|
+
# }}
|
434
|
+
#
|
435
|
+
# // Configure Mermaid
|
436
|
+
# mermaid.initialize({{ startOnLoad: false, logLevel: "debug" }});
|
437
|
+
# mermaid.init(undefined, `#${{graph_id}}`);
|
438
|
+
#
|
439
|
+
# setTimeout(() => {{
|
440
|
+
# const svg = containerElement.querySelector("svg");
|
441
|
+
# if (!svg) {{
|
442
|
+
# console.error(`SVG not rendered for ID "${{graph_id}}".`);
|
443
|
+
# return;
|
444
|
+
# }}
|
445
|
+
#
|
446
|
+
# // Set initial size
|
447
|
+
# svg.setAttribute("width", "100%");
|
448
|
+
# svg.setAttribute("height", "100%");
|
449
|
+
#
|
450
|
+
# // Initialize Pan-Zoom
|
451
|
+
# const panZoom = svgPanZoom(svg, {{
|
452
|
+
# zoomEnabled: true,
|
453
|
+
# controlIconsEnabled: false,
|
454
|
+
# fit: true,
|
455
|
+
# center: true,
|
456
|
+
# minZoom: 0.5,
|
457
|
+
# maxZoom: 10,
|
458
|
+
# contain: true
|
459
|
+
# }});
|
460
|
+
#
|
461
|
+
# // Add custom controls
|
462
|
+
# const controlsContainer = document.createElement("div");
|
463
|
+
# controlsContainer.className = "svg-pan-zoom_controls";
|
464
|
+
# controlsContainer.innerHTML = `
|
465
|
+
# <button id="${{graph_id}}-zoom-in">+</button>
|
466
|
+
# <button id="${{graph_id}}-zoom-out">-</button>
|
467
|
+
# <button id="${{graph_id}}-reset">Reset</button>
|
468
|
+
# `;
|
469
|
+
# containerElement.appendChild(controlsContainer);
|
470
|
+
#
|
471
|
+
# // Handle controls
|
472
|
+
# document.getElementById(`${{graph_id}}-zoom-in`).addEventListener("click", () => panZoom.zoomIn());
|
473
|
+
# document.getElementById(`${{graph_id}}-zoom-out`).addEventListener("click", () => panZoom.zoomOut());
|
474
|
+
# document.getElementById(`${{graph_id}}-reset`).addEventListener("click", () => {{
|
475
|
+
# panZoom.resetZoom();
|
476
|
+
# panZoom.center();
|
477
|
+
# }});
|
478
|
+
# }}, 500);
|
479
|
+
# }}
|
480
|
+
#
|
481
|
+
# if (typeof mermaid === "undefined") {{
|
482
|
+
# const script = document.createElement('script');
|
483
|
+
# script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
484
|
+
# script.onload = () => initializeMermaid(graph_id);
|
485
|
+
# document.head.appendChild(script);
|
486
|
+
# }} else {{
|
487
|
+
# initializeMermaid(graph_id);
|
488
|
+
# }}
|
489
|
+
# }});
|
490
|
+
# </script>
|
491
|
+
#
|
492
|
+
# """
|
493
|
+
#
|
494
|
+
# return html_content
|
347
495
|
# This one almost works - no controls and diagram too small
|
348
496
|
# html_content = f"""
|
349
497
|
# <!DOCTYPE html>
|
pyegeria/test_m.html
CHANGED
@@ -1,42 +1,53 @@
|
|
1
1
|
|
2
|
-
<style>
|
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
|
-
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef" class="
|
39
|
-
|
2
|
+
<style>
|
3
|
+
/* Style the diagram container */
|
4
|
+
.diagram-container {
|
5
|
+
position: relative;
|
6
|
+
width: 90%; /* Adjust container width */
|
7
|
+
height: 500px; /* Fixed height */
|
8
|
+
margin: 0 auto;
|
9
|
+
border: 1px solid #ccc;
|
10
|
+
overflow: hidden; /* Prevents content overflow */
|
11
|
+
}
|
12
|
+
|
13
|
+
/* Style custom zoom controls */
|
14
|
+
.svg-pan-zoom-controls {
|
15
|
+
position: absolute;
|
16
|
+
top: 10px;
|
17
|
+
right: 10px;
|
18
|
+
display: flex;
|
19
|
+
flex-direction: column;
|
20
|
+
gap: 5px;
|
21
|
+
z-index: 10; /* Ensures controls are above other elements */
|
22
|
+
}
|
23
|
+
|
24
|
+
.svg-pan-zoom-controls button {
|
25
|
+
background-color: #007bff;
|
26
|
+
color: white;
|
27
|
+
border: none;
|
28
|
+
padding: 5px 10px;
|
29
|
+
border-radius: 3px;
|
30
|
+
cursor: pointer;
|
31
|
+
font-size: 14px;
|
32
|
+
}
|
33
|
+
.svg-pan-zoom-controls button:hover {
|
34
|
+
background-color: #0056b3;
|
35
|
+
}
|
36
|
+
</style>
|
37
|
+
|
38
|
+
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-container" class="diagram-container">
|
39
|
+
<!-- Title/Heading (optional; include as needed) -->
|
40
|
+
|
41
|
+
<h3 id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-heading" style="margin: 20px 0; font-size: 1.5em; text-align: center;">
|
42
|
+
Component for Solution Blueprint - Clinical Trial Management Solution Blueprint
|
43
|
+
</h3>
|
44
|
+
<p id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-subheading" style="margin: 0; padding: 5px; font-size: 1em; text-align: center; color: gray; flex: 0 0 auto;">
|
45
|
+
GUID: c4f8d707-7c85-4125-b5fd-c3257a2ef2ef
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<!-- Mermaid rendering area -->
|
49
|
+
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef" class="mermaid">
|
50
|
+
flowchart TD
|
40
51
|
%%{init: {"flowchart": {"htmlLabels": false}} }%%
|
41
52
|
|
42
53
|
subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]
|
@@ -136,79 +147,97 @@ style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#
|
|
136
147
|
style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
137
148
|
style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
138
149
|
style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
139
|
-
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
150
|
+
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
151
|
+
</div>
|
140
152
|
</div>
|
141
|
-
</div>
|
142
153
|
|
143
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
154
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
144
155
|
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
156
|
+
|
145
157
|
<script>
|
146
|
-
|
147
|
-
// Initialize Mermaid and Pan-Zoom functionality
|
158
|
+
(function() {
|
148
159
|
const graph_id = "mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef";
|
160
|
+
let panZoomInstance; // Store reference to the panZoom instance
|
149
161
|
|
162
|
+
// Function to initialize Mermaid
|
150
163
|
function initializeMermaid(graph_id) {
|
151
|
-
const
|
152
|
-
|
153
|
-
|
154
|
-
|
164
|
+
const container = document.getElementById(`${graph_id}-container`);
|
165
|
+
const diagram = document.getElementById(`${graph_id}`);
|
166
|
+
|
167
|
+
if (!container || !diagram) {
|
168
|
+
console.error(`Container or diagram not found for ID "${graph_id}"`);
|
155
169
|
return;
|
156
170
|
}
|
157
171
|
|
158
|
-
//
|
159
|
-
mermaid.initialize({ startOnLoad: false
|
160
|
-
mermaid.init(undefined,
|
172
|
+
// Initialize Mermaid
|
173
|
+
mermaid.initialize({ startOnLoad: false });
|
174
|
+
mermaid.init(undefined, diagram);
|
161
175
|
|
176
|
+
// Set a small delay to allow Mermaid rendering to complete before initializing Pan-Zoom
|
162
177
|
setTimeout(() => {
|
163
|
-
const svg =
|
178
|
+
const svg = container.querySelector("svg");
|
164
179
|
if (!svg) {
|
165
|
-
console.error(`SVG not
|
180
|
+
console.error(`SVG not found for graph ID "${graph_id}"`);
|
166
181
|
return;
|
167
182
|
}
|
168
183
|
|
169
|
-
//
|
184
|
+
// Force the SVG to fit the container by setting width, height, and viewBox
|
170
185
|
svg.setAttribute("width", "100%");
|
171
186
|
svg.setAttribute("height", "100%");
|
187
|
+
svg.setAttribute("preserveAspectRatio", "xMidYMid meet");
|
188
|
+
svg.style.display = "block";
|
172
189
|
|
173
|
-
|
174
|
-
|
190
|
+
if (!svg.hasAttribute("viewBox")) {
|
191
|
+
const bbox = svg.getBBox();
|
192
|
+
svg.setAttribute("viewBox", `0 0 ${bbox.width} ${bbox.height}`);
|
193
|
+
}
|
194
|
+
|
195
|
+
// Initialize Pan-Zoom functionality
|
196
|
+
panZoomInstance = svgPanZoom(svg, {
|
175
197
|
zoomEnabled: true,
|
176
|
-
controlIconsEnabled: false,
|
198
|
+
controlIconsEnabled: false, // Use custom controls
|
177
199
|
fit: true,
|
178
200
|
center: true,
|
201
|
+
contain: true,
|
179
202
|
minZoom: 0.5,
|
180
|
-
maxZoom: 10
|
181
|
-
contain: true
|
203
|
+
maxZoom: 10
|
182
204
|
});
|
183
205
|
|
184
206
|
// Add custom controls
|
185
207
|
const controlsContainer = document.createElement("div");
|
186
|
-
controlsContainer.className = "svg-pan-
|
208
|
+
controlsContainer.className = "svg-pan-zoom-controls";
|
187
209
|
controlsContainer.innerHTML = `
|
188
|
-
<button id="${graph_id}-zoom-in">+</button>
|
189
|
-
<button id="${graph_id}-zoom-out">-</button>
|
190
|
-
<button id="${graph_id}-reset">Reset</button>
|
210
|
+
<button type="button" id="${graph_id}-zoom-in">+</button>
|
211
|
+
<button type="button" id="${graph_id}-zoom-out">-</button>
|
212
|
+
<button type="button" id="${graph_id}-reset">Reset</button>
|
191
213
|
`;
|
192
|
-
|
214
|
+
container.appendChild(controlsContainer);
|
193
215
|
|
194
|
-
//
|
195
|
-
document.getElementById(`${graph_id}-zoom-in`).addEventListener("click", () =>
|
196
|
-
|
216
|
+
// Add event listeners for the controls
|
217
|
+
document.getElementById(`${graph_id}-zoom-in`).addEventListener("click", () => {
|
218
|
+
if (panZoomInstance) panZoomInstance.zoomIn();
|
219
|
+
});
|
220
|
+
document.getElementById(`${graph_id}-zoom-out`).addEventListener("click", () => {
|
221
|
+
if (panZoomInstance) panZoomInstance.zoomOut();
|
222
|
+
});
|
197
223
|
document.getElementById(`${graph_id}-reset`).addEventListener("click", () => {
|
198
|
-
|
199
|
-
|
224
|
+
if (panZoomInstance) {
|
225
|
+
panZoomInstance.resetZoom();
|
226
|
+
panZoomInstance.center();
|
227
|
+
}
|
200
228
|
});
|
201
|
-
}, 500);
|
229
|
+
}, 500); // Delay of 500ms for Mermaid and SVG rendering
|
202
230
|
}
|
203
231
|
|
232
|
+
// Load Mermaid.js if not already loaded
|
204
233
|
if (typeof mermaid === "undefined") {
|
205
|
-
const script = document.createElement(
|
234
|
+
const script = document.createElement("script");
|
206
235
|
script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
207
236
|
script.onload = () => initializeMermaid(graph_id);
|
208
237
|
document.head.appendChild(script);
|
209
238
|
} else {
|
210
239
|
initializeMermaid(graph_id);
|
211
240
|
}
|
212
|
-
});
|
241
|
+
})();
|
213
242
|
</script>
|
214
|
-
|
243
|
+
|
@@ -245,7 +245,7 @@ pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kK
|
|
245
245
|
pyegeria/glossary_browser_omvs.py,sha256=ci57LXFjIAXWw6XXFu8pIbeR_3y4hl_x4F2-HHdy7VM,93585
|
246
246
|
pyegeria/glossary_manager_omvs.py,sha256=GJQo5E3bxv8JL84wTGqJKMrMo7QqNAPtyJJgvGpI_lU,132558
|
247
247
|
pyegeria/m_test.py,sha256=BDKRLsHsAWnwCbzHkkvfsc8ZIJ0k-jmwPPNuTSgW6Qo,7659
|
248
|
-
pyegeria/mermaid_utilities.py,sha256=
|
248
|
+
pyegeria/mermaid_utilities.py,sha256=hDLpCOmLDsh9gkqmx2jTEXRjUGYgN3wkkWzpmiN-HoA,40281
|
249
249
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
250
250
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
251
251
|
pyegeria/platform_services.py,sha256=xlF5p5HPKDGTFFDsuxm2RLhr8vjZPv4T7e2qCkDgKXE,41654
|
@@ -255,14 +255,14 @@ pyegeria/runtime_manager_omvs.py,sha256=Z5wY9ignNjil8O6yjihZftxkGoh9A4PQDcXhoIsO
|
|
255
255
|
pyegeria/server_operations.py,sha256=vmiUDU_Xa0U8pa0Fdb-QKkoeSqs7WfMwIpG_XU3xgeI,16784
|
256
256
|
pyegeria/solution_architect_omvs.py,sha256=x6CfPTyn1l2DFYVEFP0t_rT9uVjoFr596hBBeuVaMRg,22093
|
257
257
|
pyegeria/template_manager_omvs.py,sha256=PfJ9dOfmBvf59DgRdZ9Dl1Kl_UYqjF-JncXVnbCqLZU,42408
|
258
|
-
pyegeria/test_m.html,sha256=
|
258
|
+
pyegeria/test_m.html,sha256=equ-hAZ8yn8g5pzzmslQaO_k75GWaWg9OxeHpCBG_4U,13531
|
259
259
|
pyegeria/test_m1.html,sha256=XS_1IAtfG4ZlZk45QTkrFWWpjQMVlO21ScDMX2Frl3g,14086
|
260
260
|
pyegeria/test_mer.ipynb,sha256=G7hpHn07IXnt_VKvnTDvljwwHB7RfC0etOMyZKt1icQ,30809
|
261
261
|
pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
|
262
262
|
pyegeria/valid_metadata_omvs.py,sha256=kL3bEkoBtNCaQKjziFwRAqQyleu-i2ua_REIogfulFw,65031
|
263
263
|
pyegeria/x_action_author_omvs.py,sha256=6b725SPsC52AI7ols7Qq8MsBlZuAXr_BgJ_-ychVRCw,6386
|
264
|
-
pyegeria-5.3.4.
|
265
|
-
pyegeria-5.3.4.
|
266
|
-
pyegeria-5.3.4.
|
267
|
-
pyegeria-5.3.4.
|
268
|
-
pyegeria-5.3.4.
|
264
|
+
pyegeria-5.3.4.14.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
265
|
+
pyegeria-5.3.4.14.dist-info/METADATA,sha256=FftxyngR6Meq7NLfYJODC0jOAA3LLqja0sulciEPzcs,2736
|
266
|
+
pyegeria-5.3.4.14.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
267
|
+
pyegeria-5.3.4.14.dist-info/entry_points.txt,sha256=LS9g5JPSBL0whnyAcGhLZCAyUp6PkPU6fjHP9Aso1V4,6176
|
268
|
+
pyegeria-5.3.4.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|