MCPcopy Create free account
hub / github.com/dashrobotco/robot-components / getPanelCenter

Function getPanelCenter

app/nodegrid/page.tsx:3130–3134  ·  view source on GitHub ↗
(panelId: string)

Source from the content-addressed store, hash-verified

3128
3129 // Helper to get panel center
3130 const getPanelCenter = (panelId: string) => {
3131 const panel = currentPanels.find(p => p.id === panelId);
3132 if (!panel) return null;
3133 return { x: panel.x + panel.width / 2, y: panel.y + panel.height / 2 };
3134 };
3135
3136 // Snap to nearest grid coordinate (returns base grid coords, not actual position)
3137 const snapToGridCoords = (x: number, y: number) => ({

Callers 1

animateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected