Skip to content

Commit 4dd01d3

Browse files
committed
refactor: remove unused function
1 parent fba46d9 commit 4dd01d3

File tree

7 files changed

+6
-445
lines changed

7 files changed

+6
-445
lines changed

packages/layout/src/bundle-supervisor.ts

+2-23
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
1-
// @ts-ignore
21
import EventEmitter from '@antv/event-emitter';
3-
import { Edge, Graph, Node } from '@antv/graphlib';
2+
import { Graph } from '@antv/graphlib';
43
import type { Layout, LayoutSupervisor } from './types';
54
// @ts-ignore
65
// Inline the worker as a Blob. @see https://github.com/developit/workerize-loader#inline
76
import worker from 'workerize-loader?inline!./bundle-worker';
8-
// import { setupTransferableMethodsOnMain } from "@naoak/workerize-transferable";
9-
10-
/**
11-
* The payload transferred from main thread to the worker.
12-
*/
13-
export interface Payload {
14-
layout: {
15-
id: string;
16-
options: any;
17-
iterations: number;
18-
};
19-
nodes: Node<any>[];
20-
edges: Edge<any>[];
21-
}
22-
23-
interface SupervisorOptions {
24-
/**
25-
* Iterations run in algorithm such as d3force, will be passed in `tick()` later.
26-
*/
27-
iterations: number;
28-
}
7+
import type { SupervisorOptions } from './supervisor';
298

309
/**
3110
* @example

packages/layout/src/registry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { GridLayout } from './grid';
1010
import { MDSLayout } from './mds';
1111
import { RadialLayout } from './radial';
1212
import { RandomLayout } from './random';
13-
import type { LayoutConstructor } from './types';
13+
import type { Layout } from './types';
1414

15-
export const registry: Record<string, LayoutConstructor<any>> = {
15+
export const registry: Record<string, new (...args: any) => Layout<any>> = {
1616
circular: CircularLayout,
1717
concentric: ConcentricLayout,
1818
mds: MDSLayout,

packages/layout/src/supervisor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface Payload {
1717
edges: Edge<any>[];
1818
}
1919

20-
interface SupervisorOptions {
20+
export interface SupervisorOptions {
2121
/**
2222
* Iterations run in algorithm such as d3force, will be passed in `tick()` later.
2323
*/

packages/layout/src/util/gpu.ts

-240
This file was deleted.

0 commit comments

Comments
 (0)