refactor: using extends layout with registerlayout

This commit is contained in:
AlbertAZ1992 2021-03-22 16:26:19 +08:00 committed by Yanyan Wang
parent da7d439eea
commit d12f7c94f9
12 changed files with 1 additions and 92 deletions

View File

@ -1,9 +0,0 @@
import { CircularLayout } from '@antv/layout/lib/layout/circular';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('circular', CircularLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { ComboForceLayout } from '@antv/layout/lib/layout/comboForce';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('comboForce', ComboForceLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { ConcentricLayout } from '@antv/layout/lib/layout/concentric';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('concentric', ConcentricLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { DagreLayout } from '@antv/layout/lib/layout/dagre';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('dagre', DagreLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { ForceLayout } from '@antv/layout/lib/layout/force';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('force', ForceLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { FruchtermanLayout } from '@antv/layout/lib/layout/fruchterman';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('fruchterman', FruchtermanLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { GForceLayout } from '@antv/layout/lib/layout/gForce';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('gForce', GForceLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { GridLayout } from '@antv/layout/lib/layout/grid';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('grid', GridLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { MDSLayout } from '@antv/layout/lib/layout/mds';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('mds', MDSLayout);
}
export default getExtender(layoutExtender);

View File

@ -1,9 +0,0 @@
import { RadialLayout } from '@antv/layout/lib/layout/radial';
import { getExtender } from '../../util/extend';
function layoutExtender(option: any, G6: { registerLayout: Function; }) {
const { registerLayout } = G6;
registerLayout('radial', RadialLayout);
}
export default getExtender(layoutExtender);

View File

@ -39,7 +39,6 @@ const G6 = {
registerCombo,
registerEdge,
registerNode,
extend,
Algorithm,
Arrow,
Marker,