MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/openevolve / ensureGraphSvg

Function ensureGraphSvg

scripts/static/js/graph.js:158–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158function ensureGraphSvg() {
159 // Get latest width/height from state.js
160 let svgEl = d3.select('#graph').select('svg');
161 if (svgEl.empty()) {
162 svgEl = d3.select('#graph').append('svg')
163 .attr('width', width)
164 .attr('height', height)
165 .attr('id', 'graph-svg');
166 } else {
167 svgEl.attr('width', width).attr('height', height);
168 }
169 let gEl = svgEl.select('g');
170 if (gEl.empty()) {
171 gEl = svgEl.append('g');
172 }
173 return { svg: svgEl, g: gEl };
174}
175
176function applyDragHandlersToAllNodes() {
177 if (!g) return;

Callers 1

renderGraphFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected