mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 15:32:09 +08:00

* Chore: Add no-restricted-globals eslint rule * Fix eslint warnings * Revert some changes * Update * Feedback
10 lines
372 B
JavaScript
10 lines
372 B
JavaScript
import { layout } from './layeredLayout';
|
|
|
|
// Separate from main implementation so it does not trip out tests
|
|
// eslint-disable-next-line no-restricted-globals
|
|
addEventListener('message', async (event) => {
|
|
const { nodes, edges, config } = event.data;
|
|
const [newNodes, newEdges] = layout(nodes, edges, config);
|
|
postMessage({ nodes: newNodes, edges: newEdges });
|
|
});
|