|
62 | 62 | transform: rotate(-90deg); /* Right arrow for collapsed state */ |
63 | 63 | } |
64 | 64 |
|
65 | | - #config-container-content-9df7dbe0 { |
| 65 | + #config-container-content-b1f3989b { |
66 | 66 | max-height: 40vh; /* Default expanded max height */ |
67 | 67 | overflow-y: auto; |
68 | 68 | padding: 15px; |
|
71 | 71 | transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; |
72 | 72 | } |
73 | 73 |
|
74 | | - .collapsed #config-container-content-9df7dbe0 { |
| 74 | + .collapsed #config-container-content-b1f3989b { |
75 | 75 | max-height: 0; |
76 | 76 | padding-top: 0; |
77 | 77 | padding-bottom: 0; |
78 | 78 | overflow: hidden; |
79 | 79 | border-bottom: none; /* Hide border when collapsed */ |
80 | 80 | } |
81 | 81 |
|
82 | | - #mynetwork-9df7dbe0 { |
| 82 | + #mynetwork-b1f3989b { |
83 | 83 | width: 100%; |
84 | 84 | flex-grow: 1; /* Graph takes remaining vertical space */ |
85 | 85 | min-height: 0; /* Important for flex children to shrink */ |
|
119 | 119 | </style> |
120 | 120 | </head> |
121 | 121 | <body> |
122 | | - <div class="config-panel-wrapper" id="config-panel-wrapper-9df7dbe0"> |
123 | | - <div class="config-panel-header" id="config-panel-header-9df7dbe0" role="button" tabindex="0" aria-expanded="true" aria-controls="config-container-content-9df7dbe0"> |
| 122 | + <div class="config-panel-wrapper" id="config-panel-wrapper-b1f3989b"> |
| 123 | + <div class="config-panel-header" id="config-panel-header-b1f3989b" role="button" tabindex="0" aria-expanded="true" aria-controls="config-container-content-b1f3989b"> |
124 | 124 | <h3>Configuration</h3> |
125 | | - <button class="config-toggle-btn" id="config-toggle-btn-9df7dbe0" aria-label="Toggle configuration panel"></button> |
| 125 | + <button class="config-toggle-btn" id="config-toggle-btn-b1f3989b" aria-label="Toggle configuration panel"></button> |
126 | 126 | </div> |
127 | | - <div id="config-container-content-9df7dbe0"> |
| 127 | + <div id="config-container-content-b1f3989b"> |
128 | 128 | <!-- Vis.js configuration UI will be injected here --> |
129 | 129 | </div> |
130 | 130 | </div> |
131 | 131 |
|
132 | | - <div id="mynetwork-9df7dbe0"></div> |
| 132 | + <div id="mynetwork-b1f3989b"></div> |
133 | 133 |
|
134 | 134 | <script type="text/javascript"> |
135 | 135 | (function() { |
136 | 136 | var nodesArray = [{"id": "R0", "label": "R0", "group": 0, "value": 1, "title": "Random Node R0\nGroup: 0\nValue: 1", "font": {"color": "black", "size": 10}}, {"id": "R1", "label": "R1", "group": 1, "value": 2, "title": "Random Node R1\nGroup: 1\nValue: 2", "font": {}}, {"id": "R2", "label": "R2", "group": 2, "value": 3, "title": "Random Node R2\nGroup: 2\nValue: 3", "font": {}}, {"id": "R3", "label": "R3", "group": 3, "value": 4, "title": "Random Node R3\nGroup: 3\nValue: 4", "font": {}}, {"id": "R4", "label": "R4", "group": 0, "value": 5, "title": "Random Node R4\nGroup: 0\nValue: 5", "font": {"color": "black", "size": 10}}, {"id": "R5", "label": "R5", "group": 1, "value": 1, "title": "Random Node R5\nGroup: 1\nValue: 1", "font": {}}, {"id": "R6", "label": "R6", "group": 2, "value": 2, "title": "Random Node R6\nGroup: 2\nValue: 2", "font": {}}, {"id": "R7", "label": "R7", "group": 3, "value": 3, "title": "Random Node R7\nGroup: 3\nValue: 3", "font": {}}, {"id": "R8", "label": "R8", "group": 0, "value": 4, "title": "Random Node R8\nGroup: 0\nValue: 4", "font": {"color": "black", "size": 10}}, {"id": "R9", "label": "R9", "group": 1, "value": 5, "title": "Random Node R9\nGroup: 1\nValue: 5", "font": {}}, {"id": "R10", "label": "R10", "group": 2, "value": 1, "title": "Random Node R10\nGroup: 2\nValue: 1", "font": {}}, {"id": "R11", "label": "R11", "group": 3, "value": 2, "title": "Random Node R11\nGroup: 3\nValue: 2", "font": {}}, {"id": "R12", "label": "R12", "group": 0, "value": 3, "title": "Random Node R12\nGroup: 0\nValue: 3", "font": {"color": "black", "size": 10}}, {"id": "R13", "label": "R13", "group": 1, "value": 4, "title": "Random Node R13\nGroup: 1\nValue: 4", "font": {}}, {"id": "R14", "label": "R14", "group": 2, "value": 5, "title": "Random Node R14\nGroup: 2\nValue: 5", "font": {}}, {"id": "R15", "label": "R15", "group": 3, "value": 1, "title": "Random Node R15\nGroup: 3\nValue: 1", "font": {}}, {"id": "R16", "label": "R16", "group": 0, "value": 2, "title": "Random Node R16\nGroup: 0\nValue: 2", "font": {"color": "black", "size": 10}}, {"id": "R17", "label": "R17", "group": 1, "value": 3, "title": "Random Node R17\nGroup: 1\nValue: 3", "font": {}}, {"id": "R18", "label": "R18", "group": 2, "value": 4, "title": "Random Node R18\nGroup: 2\nValue: 4", "font": {}}, {"id": "R19", "label": "R19", "group": 3, "value": 5, "title": "Random Node R19\nGroup: 3\nValue: 5", "font": {}}, {"id": "Source", "label": "START", "shape": "diamond", "color": {"background": "lightgreen", "border": "darkgreen", "highlight": {"background": "green", "border": "darkgreen"}}, "size": 30, "group": 4, "title": "This is the main Source node", "font": {"size": 16, "color": "darkgreen", "face": "Arial", "strokeWidth": 1, "strokeColor": "white"}, "fixed": {"x": true, "y": true}, "x": -400, "y": -200}, {"id": "Sink", "label": "END", "shape": "star", "color": "gold", "size": 30, "group": 4, "title": "This is the main Sink node", "font": {"size": 16, "color": "black", "face": "Georgia"}, "fixed": {"x": true, "y": true}, "x": 400, "y": 200}, {"id": "Hub", "label": "Central Hub", "shape": "ellipse", "color": "lightblue", "size": 25, "group": 5, "title": "A central connecting hub", "font": {"multi": "html", "bold": "18px arial darkblue"}}, {"id": "Isolated", "label": "I'm Alone", "shape": "text", "title": "An isolated node example", "color": "#FFCCFF", "font": {"size": 12, "color": "purple"}}]; |
137 | | - var edgesArray = [{"from": "R0", "to": "Source", "weight": 1, "color": "darkgreen", "label": "S->R0"}, {"from": "R0", "to": "R5", "color": {"color": "red", "highlight": "darkred", "hover": "pink", "opacity": 0.7}, "label": "Opacity Edge", "weight": 2}, {"from": "R1", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R1 to Hub"}, {"from": "R2", "to": "R3", "weight": 1, "color": "#cccccc", "title": "R2-R3"}, {"from": "R3", "to": "Sink", "weight": 3, "color": "orange", "label": "R3->E", "arrows": "to"}, {"from": "R5", "to": "Source", "weight": 3, "color": "darkgreen", "label": "S->R5"}, {"from": "R5", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R5 to Hub"}, {"from": "R7", "to": "Sink", "weight": 3, "color": "orange", "label": "R7->E", "arrows": "to"}, {"from": "R9", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R9 to Hub"}, {"from": "R10", "to": "Source", "weight": 2, "color": "darkgreen", "label": "S->R10"}, {"from": "R11", "to": "Sink", "weight": 3, "color": "orange", "label": "R11->E", "arrows": "to"}, {"from": "R12", "to": "R13", "weight": 1, "color": "#cccccc", "title": "R12-R13"}, {"from": "R13", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R13 to Hub"}, {"from": "R15", "to": "Source", "weight": 1, "color": "darkgreen", "label": "S->R15"}, {"from": "R15", "to": "Sink", "weight": 3, "color": "orange", "label": "R15->E", "arrows": "to"}, {"from": "R17", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R17 to Hub"}, {"from": "R19", "to": "Sink", "weight": 3, "color": "orange", "label": "R19->E", "arrows": "to"}, {"from": "Source", "to": "Hub", "weight": 5, "color": "darkgreen", "width": 4, "title": "Main link to Hub"}, {"from": "Sink", "to": "Hub", "weight": 5, "color": "blue", "width": 4, "title": "Main link from Hub to Sink", "arrows": "to", "smooth": {"type": "curvedCW", "roundness": 0.2}}]; |
| 137 | + var edgesArray = [{"from": "R0", "to": "Source", "weight": 1, "color": "darkgreen", "label": "S->R0"}, {"from": "R0", "to": "R5", "color": {"color": "red", "highlight": "darkred", "hover": "pink", "opacity": 0.7}, "label": "Opacity Edge", "weight": 2}, {"from": "R1", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R1 to Hub"}, {"from": "R3", "to": "Sink", "weight": 3, "color": "orange", "label": "R3->E", "arrows": "to"}, {"from": "R5", "to": "Source", "weight": 3, "color": "darkgreen", "label": "S->R5"}, {"from": "R5", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R5 to Hub"}, {"from": "R7", "to": "Sink", "weight": 3, "color": "orange", "label": "R7->E", "arrows": "to"}, {"from": "R9", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R9 to Hub"}, {"from": "R10", "to": "Source", "weight": 2, "color": "darkgreen", "label": "S->R10"}, {"from": "R11", "to": "Sink", "weight": 3, "color": "orange", "label": "R11->E", "arrows": "to"}, {"from": "R13", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R13 to Hub"}, {"from": "R15", "to": "Source", "weight": 1, "color": "darkgreen", "label": "S->R15"}, {"from": "R15", "to": "Sink", "weight": 3, "color": "orange", "label": "R15->E", "arrows": "to"}, {"from": "R15", "to": "R16", "weight": 1, "color": "#cccccc", "title": "R15-R16"}, {"from": "R17", "to": "Hub", "weight": 2, "dashes": [5, 5], "color": "gray", "title": "R17 to Hub"}, {"from": "R19", "to": "Sink", "weight": 3, "color": "orange", "label": "R19->E", "arrows": "to"}, {"from": "Source", "to": "Hub", "weight": 5, "color": "darkgreen", "width": 4, "title": "Main link to Hub"}, {"from": "Sink", "to": "Hub", "weight": 5, "color": "blue", "width": 4, "title": "Main link from Hub to Sink", "arrows": "to", "smooth": {"type": "curvedCW", "roundness": 0.2}}]; |
138 | 138 | var optionsObject = {"autoResize": true, "nodes": {"shape": "dot", "size": 16, "font": {"size": 12, "color": "#333333", "face": "Tahoma"}, "borderWidth": 2, "borderWidthSelected": 4, "scaling": {"min": 10, "max": 30, "label": {"enabled": true, "min": 8, "max": 20}}, "shadow": {"enabled": true, "size": 5, "x": 3, "y": 3}}, "edges": {"width": 1, "smooth": {"type": "dynamic", "roundness": 0.5, "enabled": true}, "arrows": {"to": {"enabled": false, "scaleFactor": 0.8, "type": "arrow"}}, "color": {"color": "#848484", "highlight": "#000000", "hover": "#555555", "inherit": "from", "opacity": 1.0}, "font": {"size": 10, "color": "black", "strokeWidth": 0, "align": "horizontal"}, "scaling": {"min": 1, "max": 8, "label": {"enabled": false}}, "hoverWidth": 1.5, "selectionWidth": 2}, "physics": {"enabled": true, "barnesHut": {"gravitationalConstant": -15000, "springConstant": 0.05, "springLength": 120, "damping": 0.15, "avoidOverlap": 0.2, "centralGravity": 0.1}, "solver": "barnesHut", "stabilization": {"iterations": 1000, "fit": true, "enabled": true, "updateInterval": 50, "onlyDynamicEdges": false}, "adaptiveTimestep": true, "minVelocity": 0.75}, "interaction": {"hover": true, "dragNodes": true, "dragView": true, "zoomView": true, "tooltipDelay": 200, "navigationButtons": true, "keyboard": {"enabled": true, "speed": {"x": 10, "y": 10, "zoom": 0.05}, "bindToWindow": true}, "multiselect": true, "selectable": true, "selectConnectedEdges": true}, "layout": {"randomSeed": 42, "improvedLayout": true}, "groups": {"0": {"color": {"background": "cyan", "border": "blue"}, "shape": "dot"}, "1": {"color": {"background": "pink", "border": "purple"}, "shape": "square", "font": {"color": "purple"}}, "2": {"color": {"background": "yellow", "border": "orange"}, "shape": "triangle"}, "3": {"color": {"background": "lime", "border": "green"}, "shape": "triangleDown"}, "4": {"borderWidth": 3, "shadow": {"enabled": false}}, "5": {"shape": "hexagon", "color": "lightgray"}}, "configure": {"enabled": true, "showButton": false}}; |
139 | 139 |
|
140 | | - var configWrapper = document.getElementById('config-panel-wrapper-9df7dbe0'); |
141 | | - var configHeader = document.getElementById('config-panel-header-9df7dbe0'); |
142 | | - var configContent = document.getElementById('config-container-content-9df7dbe0'); |
143 | | - var toggleButton = document.getElementById('config-toggle-btn-9df7dbe0'); // Also target button for ARIA |
| 140 | + var configWrapper = document.getElementById('config-panel-wrapper-b1f3989b'); |
| 141 | + var configHeader = document.getElementById('config-panel-header-b1f3989b'); |
| 142 | + var configContent = document.getElementById('config-container-content-b1f3989b'); |
| 143 | + var toggleButton = document.getElementById('config-toggle-btn-b1f3989b'); // Also target button for ARIA |
144 | 144 |
|
145 | 145 | if (optionsObject.configure && optionsObject.configure.enabled) { |
146 | 146 | if (!optionsObject.configure.container) { // Only set if user hasn't provided one |
@@ -178,7 +178,7 @@ <h3>Configuration</h3> |
178 | 178 |
|
179 | 179 | var nodes = new vis.DataSet(nodesArray); |
180 | 180 | var edges = new vis.DataSet(edgesArray); |
181 | | - var graphContainer = document.getElementById('mynetwork-9df7dbe0'); |
| 181 | + var graphContainer = document.getElementById('mynetwork-b1f3989b'); |
182 | 182 | var data = { nodes: nodes, edges: edges }; |
183 | 183 | var network = new vis.Network(graphContainer, data, optionsObject); |
184 | 184 |
|
|
0 commit comments