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

Function resize

scripts/static/js/main.js:140–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138export let height = window.innerHeight;
139
140function resize() {
141 width = window.innerWidth;
142 const toolbarHeight = document.getElementById('toolbar').offsetHeight;
143 height = window.innerHeight - toolbarHeight;
144 // Re-render the graph with new width/height and latest data
145 // allNodeData may be [] on first load, so only re-render if nodes exist
146 if (allNodeData && allNodeData.length > 0) {
147 // Find edges from lastDataStr if possible, else from allNodeData
148 let edges = [];
149 if (typeof lastDataStr === 'string') {
150 try {
151 const parsed = JSON.parse(lastDataStr);
152 edges = parsed.edges || [];
153 } catch {}
154 }
155 renderGraph({ nodes: allNodeData, edges });
156 }
157}
158window.addEventListener('resize', resize);
159
160// Highlight logic for graph and list views

Callers

nothing calls this directly

Calls 1

renderGraphFunction · 0.90

Tested by

no test coverage detected