diff --git a/package.json b/package.json index dabcb6c7951..d76e721d29f 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,8 @@ "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.12", "@types/jsdom": "^21.1.6", "@types/node": "^20.11.24", @@ -56,9 +58,9 @@ "rollup-plugin-polyfill-node": "^0.13.0", "rollup-plugin-visualizer": "^5.12.0", "stats.js": "^0.17.0", - "ts-jest": "^29.1.2", "turbo": "^1.12.4", "typescript": "^5.3.3", - "vite": "^5.1.5" + "vite": "^5.1.5", + "xml-formatter": "^3.6.2" } } diff --git a/packages/g6-extension-3d/jest.config.js b/packages/g6-extension-3d/jest.config.js index 6a28540e9d5..27d57b860cd 100644 --- a/packages/g6-extension-3d/jest.config.js +++ b/packages/g6-extension-3d/jest.config.js @@ -1,19 +1,6 @@ module.exports = { - preset: 'ts-jest/presets/js-with-ts', transform: { - '^.+\\.[tj]s$': [ - 'ts-jest', - { - diagnostics: { - exclude: ['**'], - }, - tsconfig: { - allowJs: true, - target: 'esnext', - esModuleInterop: true, - }, - }, - ], + '^.+\\.[tj]s$': ['@swc/jest'], }, testRegex: '(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$', collectCoverageFrom: ['src/**/*.ts'], diff --git a/packages/g6/__tests__/demo/animation/animation-breathe.ts b/packages/g6/__tests__/demo/animation/animation-breathe.ts deleted file mode 100644 index bb2fc0372f5..00000000000 --- a/packages/g6/__tests__/demo/animation/animation-breathe.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { executor } from '@/src/animations'; -import type { Animation } from '@/src/animations/types'; -import type { BaseShapeStyleProps } from '@/src/elements/shapes/base-shape'; -import { BaseShape } from '@/src/elements/shapes/base-shape'; -import { Circle, Group } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -type ShapeStyleProps = BaseShapeStyleProps & { size: number; color: string; outline: number; outlineOpacity: number }; - -class Shape extends BaseShape { - private getKeyStyle({ size, color } = this.attributes) { - return { - r: size / 2, - fill: color, - }; - } - - private getHaloStyle({ size, color, outline, outlineOpacity } = this.attributes) { - return { - r: size / 2, - fill: 'transparent', - stroke: color, - strokeOpacity: outlineOpacity, - lineWidth: outline, - }; - } - - public render(attributes: any, container: Group): void { - this.upsert('key', Circle, this.getKeyStyle(attributes), container); - - this.upsert('halo', Circle, this.getHaloStyle(attributes), container); - } -} - -export const animationBreathe: AnimationTestCase = async ({ container }) => { - const animation: Animation = [ - { - fields: ['lineWidth'], - shape: 'halo', - iterations: Infinity, - direction: 'alternate', - }, - ]; - - const shape = container.appendChild( - new Shape({ - style: { - x: 100, - y: 100, - size: 50, - color: 'red', - outline: 8, - outlineOpacity: 0.3, - opacity: 0, - }, - }), - ); - - return executor( - shape, - animation, - { duration: 1000, easing: 'linear' }, - { - originalStyle: { ...shape.attributes, size: 60, outline: 0, outlineOpacity: 0.1 }, - states: [], - }, - ); -}; - -animationBreathe.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/animation-fade-in.ts b/packages/g6/__tests__/demo/animation/animation-fade-in.ts deleted file mode 100644 index 6f1df78417d..00000000000 --- a/packages/g6/__tests__/demo/animation/animation-fade-in.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { executor } from '@/src/animations'; -import type { Animation } from '@/src/animations/types'; -import type { BaseShapeStyleProps } from '@/src/elements/shapes/base-shape'; -import { BaseShape } from '@/src/elements/shapes/base-shape'; -import { Circle, Group } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -type ShapeStyleProps = BaseShapeStyleProps & { size: number; color: string }; - -class Shape extends BaseShape { - private getKeyStyle({ size, color } = this.attributes) { - return { - r: size / 2, - fill: color, - }; - } - - private getHaloStyle({ size, color } = this.attributes) { - return { - r: size / 2 + 2, - fill: 'transparent', - stroke: color, - lineWidth: 4, - strokeOpacity: 0.6, - }; - } - - public render(attributes: any, container: Group): void { - this.upsert('key', Circle, this.getKeyStyle(attributes), container); - this.upsert('halo', Circle, this.getHaloStyle(attributes), container); - } -} - -export const animationFadeIn: AnimationTestCase = async ({ container }) => { - const animation: Animation = [ - { - fields: ['opacity'], - }, - ]; - - const shape = container.appendChild( - new Shape({ - style: { - x: 100, - y: 100, - size: 50, - color: 'red', - opacity: 0.8, - }, - }), - ); - - return executor( - shape, - animation, - { duration: 1000, easing: 'linear', iterations: Infinity, direction: 'alternate' }, - { - originalStyle: { ...shape.attributes, opacity: 0 }, - states: [], - }, - ); -}; - -animationFadeIn.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/animation-translate.ts b/packages/g6/__tests__/demo/animation/animation-translate.ts deleted file mode 100644 index ed16381c013..00000000000 --- a/packages/g6/__tests__/demo/animation/animation-translate.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { executor } from '@/src/animations'; -import type { Animation } from '@/src/animations/types'; -import type { BaseShapeStyleProps } from '@/src/elements/shapes/base-shape'; -import { BaseShape } from '@/src/elements/shapes/base-shape'; -import { Circle, Group } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -type ShapeStyleProps = BaseShapeStyleProps & { size: number; color: string }; - -class Shape extends BaseShape { - private getKeyStyle({ size, color } = this.attributes) { - return { - r: size / 2, - fill: color, - }; - } - - private getHaloStyle({ size, color } = this.attributes) { - return { - r: size / 2 + 2, - fill: 'transparent', - stroke: color, - lineWidth: 4, - strokeOpacity: 0.6, - }; - } - - public render(attributes: any, container: Group): void { - this.upsert('key', Circle, this.getKeyStyle(attributes), container); - this.upsert('halo', Circle, this.getHaloStyle(attributes), container); - } -} - -export const animationTranslate: AnimationTestCase = async ({ container }) => { - const animation: Animation = [ - { - fields: ['x', 'y'], - }, - ]; - - const shape = container.appendChild( - new Shape({ - style: { - x: 100, - y: 100, - size: 50, - color: '#e3640d', - opacity: 0.8, - }, - }), - ); - - return executor( - shape, - animation, - { duration: 1000, easing: 'linear', iterations: Infinity, direction: 'alternate' }, - { - originalStyle: { ...shape.attributes, x: 200, y: 200 }, - states: [], - }, - ); -}; - -animationTranslate.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/animation-wave.ts b/packages/g6/__tests__/demo/animation/animation-wave.ts deleted file mode 100644 index 3a49b3c5120..00000000000 --- a/packages/g6/__tests__/demo/animation/animation-wave.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { executor } from '@/src/animations'; -import type { Animation } from '@/src/animations/types'; -import type { BaseShapeStyleProps } from '@/src/elements/shapes/base-shape'; -import { BaseShape } from '@/src/elements/shapes/base-shape'; -import { Circle, Group } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -type ShapeStyleProps = BaseShapeStyleProps & { size: number; color: string }; - -class Shape extends BaseShape { - private getInnerStyle({ size, color, opacity } = this.attributes) { - return { - r: size / 2, - fill: color, - opacity, - }; - } - - private getMiddleStyle({ size, color, opacity } = this.attributes) { - return { - r: size / 2, - fill: color, - opacity, - }; - } - - private getOuterStyle({ size, color, opacity } = this.attributes) { - return { - r: size / 2, - fill: color, - opacity, - }; - } - - public render(attributes: any, container: Group): void { - this.upsert('inner', Circle, this.getInnerStyle(attributes), container); - this.upsert('middle', Circle, this.getMiddleStyle(attributes), container); - this.upsert('outer', Circle, this.getOuterStyle(attributes), container); - } -} - -export const animationWave: AnimationTestCase = async ({ container }) => { - const animation: Animation = [ - { - fields: ['r'], - shape: 'inner', - }, - { - fields: ['r'], - shape: 'middle', - delay: 500, - }, - { - fields: ['r'], - shape: 'outer', - delay: 1000, - }, - ]; - - const shape = container.appendChild( - new Shape({ - style: { - x: 100, - y: 100, - size: 50, - color: '#5393f4', - opacity: 0.5, - }, - }), - ); - - return executor( - shape, - animation, - { duration: 3000, easing: 'linear', iterations: Infinity }, - { - originalStyle: { ...shape.attributes, opacity: 0.5, size: 0, color: 'blue' }, - states: [], - }, - ); -}; - -animationWave.times = [0, 500, 1000, 1500, 2000, 3000]; diff --git a/packages/g6/__tests__/demo/animation/animation-zoom-in.ts b/packages/g6/__tests__/demo/animation/animation-zoom-in.ts deleted file mode 100644 index 85bf9b524ab..00000000000 --- a/packages/g6/__tests__/demo/animation/animation-zoom-in.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { executor } from '@/src/animations'; -import type { Animation } from '@/src/animations/types'; -import type { BaseShapeStyleProps } from '@/src/elements/shapes/base-shape'; -import { BaseShape } from '@/src/elements/shapes/base-shape'; -import { Circle, Group } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -type ShapeStyleProps = BaseShapeStyleProps & { size: number; color: string; outline: number; outlineOpacity: number }; - -class Shape extends BaseShape { - private getKeyStyle({ size, color } = this.attributes) { - return { - r: size / 2, - fill: color, - }; - } - - private getHaloStyle({ size, color, outline, outlineOpacity } = this.attributes) { - return { - r: size / 2, - fill: 'transparent', - stroke: color, - strokeOpacity: outlineOpacity, - lineWidth: outline, - }; - } - - public render(attributes: any, container: Group): void { - this.upsert('key', Circle, this.getKeyStyle(attributes), container); - - this.upsert('halo', Circle, this.getHaloStyle(attributes), container); - } -} - -export const animationZoomIn: AnimationTestCase = async ({ container }) => { - const animation: Animation = [ - { - fields: ['size', 'color'], - }, - ]; - - const shape = container.appendChild( - new Shape({ - style: { - x: 100, - y: 100, - size: 50, - color: 'red', - outline: 8, - outlineOpacity: 0.3, - opacity: 0, - }, - }), - ); - - return executor( - shape, - animation, - { duration: 1000, easing: 'linear', iterations: Infinity, direction: 'alternate' }, - { - originalStyle: { ...shape.attributes, color: 'orange', size: 0, outline: 0, outlineOpacity: 0.1 }, - states: [], - }, - ); -}; - -animationZoomIn.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/controller-element-position.ts b/packages/g6/__tests__/demo/animation/controller-element-position.ts deleted file mode 100644 index c5c71199e0d..00000000000 --- a/packages/g6/__tests__/demo/animation/controller-element-position.ts +++ /dev/null @@ -1,62 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import type { AnimateEvent } from '@/src/utils/event'; -import type { IAnimation } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -export const controllerElementPosition: AnimationTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 250, y: 200 } }, - { id: 'node-2', style: { x: 250, y: 200 } }, - { id: 'node-3', style: { x: 250, y: 200 } }, - { id: 'node-4', style: { x: 250, y: 200 } }, - { id: 'node-5', style: { x: 250, y: 200 } }, - { id: 'node-6', style: { x: 250, y: 200 } }, - ], - edges: [ - { source: 'node-1', target: 'node-2' }, - { source: 'node-2', target: 'node-3' }, - { source: 'node-3', target: 'node-1' }, - { source: 'node-3', target: 'node-5' }, - { source: 'node-2', target: 'node-4' }, - { source: 'node-2', target: 'node-5' }, - { source: 'node-3', target: 'node-6' }, - { source: 'node-4', target: 'node-5' }, - { source: 'node-5', target: 'node-6' }, - ], - }, - node: { - style: { - size: 20, - }, - }, - }; - - const graph = new Graph(options); - await graph.render(); - - const result = new Promise((resolve) => { - graph.once('beforeanimate', (e: AnimateEvent) => { - resolve(e.animation!); - }); - }); - - graph.translateElementTo( - { - 'node-1': [250, 100], - 'node-2': [175, 200], - 'node-3': [325, 200], - 'node-4': [100, 300], - 'node-5': [250, 300], - 'node-6': [400, 300], - }, - context.animation, - ); - - return await result; -}; - -controllerElementPosition.times = [0, 200, 1000]; diff --git a/packages/g6/__tests__/demo/animation/controller-element.ts b/packages/g6/__tests__/demo/animation/controller-element.ts deleted file mode 100644 index 1983c533943..00000000000 --- a/packages/g6/__tests__/demo/animation/controller-element.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Graph, type G6Spec } from '@/src'; -import type { AnimateEvent } from '@/src/utils/event'; -import type { IAnimation } from '@antv/g'; -import type { AnimationTestCase } from '../types'; - -export const controllerElement: AnimationTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 50, y: 50 } }, - { id: 'node-2', style: { x: 200, y: 50 } }, - { id: 'node-3', style: { x: 125, y: 150 } }, - ], - edges: [ - { source: 'node-1', target: 'node-2' }, - { source: 'node-2', target: 'node-3' }, - { source: 'node-3', target: 'node-1' }, - ], - }, - theme: 'light', - node: { - style: { - size: 20, - }, - }, - edge: { - style: {}, - }, - }; - - const graph = new Graph(options); - await graph.render(); - - graph.addNodeData([ - { id: 'node-4', style: { x: 50, y: 200, color: 'orange' } }, - { id: 'node-5', style: { x: 75, y: 150, color: 'purple' } }, - { id: 'node-6', style: { x: 200, y: 100, color: 'cyan' } }, - ]); - - graph.removeNodeData(['node-1']); - - graph.updateNodeData([{ id: 'node-2', style: { x: 200, y: 200, stroke: 'green' } }]); - - const result = new Promise((resolve) => { - graph.once('beforeanimate', (e: AnimateEvent) => { - resolve(e.animation!); - }); - }); - - graph.draw(); - - return await result; -}; - -controllerElement.times = [50, 200, 1000]; diff --git a/packages/g6/__tests__/demo/animation/edge-cubic.ts b/packages/g6/__tests__/demo/animation/edge-cubic.ts deleted file mode 100644 index e2a5ba2cabe..00000000000 --- a/packages/g6/__tests__/demo/animation/edge-cubic.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Cubic } from '@/src/elements/edges'; -import { createEdgeNode } from '@@/utils'; -import type { AnimationTestCase } from '../types'; - -export const edgeCubic: AnimationTestCase = async (context) => { - const { container } = context; - - const cubic = new Cubic({ - style: { - sourceNode: createEdgeNode([100, 50]), - targetNode: createEdgeNode([300, 50]), - lineWidth: 2, - stroke: '#1890FF', - labelText: 'cubic-edge', - labelFontSize: 12, - endArrow: true, - }, - }); - - container.appendChild(cubic); - - const result = cubic.animate( - [ - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([300, 200]), curveOffset: 30 }, - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([450, 350]), curveOffset: 60 }, - ], - { duration: 1000, fill: 'both' }, - ); - - return result; -}; - -edgeCubic.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/edge-line.ts b/packages/g6/__tests__/demo/animation/edge-line.ts deleted file mode 100644 index 3c676962e4b..00000000000 --- a/packages/g6/__tests__/demo/animation/edge-line.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Line } from '@/src/elements/edges'; -import { createEdgeNode } from '@@/utils'; -import type { AnimationTestCase } from '../types'; - -export const edgeLine: AnimationTestCase = async (context) => { - const { container } = context; - - const line = new Line({ - style: { - sourceNode: createEdgeNode([100, 50]), - targetNode: createEdgeNode([300, 50]), - lineWidth: 2, - lineDash: [10, 10], - stroke: '#1890FF', - halo: true, - haloOpacity: 0.25, - haloLineWidth: 12, - label: true, - labelText: 'line-edge', - labelFontSize: 12, - labelFill: '#000', - labelPadding: 0, - startArrow: true, - startArrowType: 'circle', - endArrow: true, - endArrowFill: 'red', - }, - }); - - container.appendChild(line); - - const result = line.animate( - [ - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([300, 200]), haloOpacity: 0 }, - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([450, 350]), haloOpacity: 0.25 }, - ], - { duration: 1000, fill: 'both' }, - ); - - return result; -}; - -edgeLine.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/edge-quadratic.ts b/packages/g6/__tests__/demo/animation/edge-quadratic.ts deleted file mode 100644 index 93a43ef5a45..00000000000 --- a/packages/g6/__tests__/demo/animation/edge-quadratic.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Quadratic } from '@/src/elements/edges'; -import { createEdgeNode } from '@@/utils'; -import type { AnimationTestCase } from '../types'; - -export const edgeQuadratic: AnimationTestCase = async (context) => { - const { container } = context; - - const quadratic = new Quadratic({ - style: { - sourceNode: createEdgeNode([100, 50]), - targetNode: createEdgeNode([300, 50]), - lineWidth: 2, - stroke: '#1890FF', - labelText: 'quadratic-edge', - labelFontSize: 12, - endArrow: true, - }, - }); - - container.appendChild(quadratic); - - const result = quadratic.animate( - [ - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([300, 200]) }, - { sourceNode: createEdgeNode([100, 150]), targetNode: createEdgeNode([450, 350]) }, - ], - { duration: 1000, fill: 'both' }, - ); - - return result; -}; - -edgeQuadratic.times = [0, 500, 1000]; diff --git a/packages/g6/__tests__/demo/animation/index.ts b/packages/g6/__tests__/demo/animation/index.ts deleted file mode 100644 index 0c33f6bda2b..00000000000 --- a/packages/g6/__tests__/demo/animation/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './animation-breathe'; -export * from './animation-fade-in'; -export * from './animation-translate'; -export * from './animation-wave'; -export * from './animation-zoom-in'; -export * from './controller-element'; -export * from './controller-element-position'; -export * from './controller-element-state'; -export * from './edge-cubic'; -export * from './edge-line'; -export * from './edge-quadratic'; -export * from './shape-label'; diff --git a/packages/g6/__tests__/demo/animation/shape-label.ts b/packages/g6/__tests__/demo/animation/shape-label.ts deleted file mode 100644 index 2b0162b125c..00000000000 --- a/packages/g6/__tests__/demo/animation/shape-label.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Label } from '@/src/elements/shapes/label'; -import type { AnimationTestCase } from '../types'; - -export const shapeLabel: AnimationTestCase = async (context) => { - const { container } = context; - - const label = new Label({ - style: { - text: 'label text', - fontSize: 20, - x: 50, - y: 50, - stroke: 'pink', - fontFamily: 'Arial', - fill: 'transparent', - backgroundLineWidth: 2, - backgroundStroke: 'pink', - }, - }); - - container.appendChild(label); - - const result = label.animate( - [ - { x: 50, y: 50 }, - { x: 200, y: 200 }, - ], - { duration: 1000, fill: 'both' }, - ); - - return result; -}; - -shapeLabel.times = [0, 1000]; diff --git a/packages/g6/__tests__/demo/index.ts b/packages/g6/__tests__/demo/index.ts deleted file mode 100644 index 62aa376ac42..00000000000 --- a/packages/g6/__tests__/demo/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as animations from './animation'; -export * as cases from './case'; -export * as statics from './static'; diff --git a/packages/g6/__tests__/demo/static/common.ts b/packages/g6/__tests__/demo/static/common.ts deleted file mode 100644 index cb7e5701aa1..00000000000 --- a/packages/g6/__tests__/demo/static/common.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 包含可在浏览器和 node 环境下运行的测试用例,依赖了 @antv/layout-wasm 的测试用例将被排除 - * - * Contains test cases that can run in both browser and node environments, and test cases that depend on @antv/layout-wasm will be excluded - */ - -export * from './controller-element'; -export * from './controller-element-position'; -export * from './controller-element-visibility'; -export * from './controller-element-z-index'; -export * from './controller-layout-antv-dagre'; -export * from './controller-layout-circular'; -export * from './controller-layout-compact-box'; -export * from './controller-layout-d3-force'; -export * from './controller-layout-dendrogram'; -export * from './controller-layout-force'; -export * from './controller-layout-grid'; -export * from './controller-layout-indented'; -export * from './controller-layout-mindmap'; -export * from './controller-layout-radial'; -export * from './controller-viewport'; -export * from './edge-arrow'; -export * from './edge-cubic'; -export * from './edge-cubic-horizontal'; -export * from './edge-cubic-vertical'; -export * from './edge-custom-arrow'; -export * from './edge-line'; -export * from './edge-loop-curve'; -export * from './edge-loop-polyline'; -export * from './edge-polyline'; -export * from './edge-port'; -export * from './edge-quadratic'; -export * from './element-label-background'; -export * from './element-label-oversized'; -export * from './graph-element'; -export * from './layered-canvas'; -export * from './node-circle'; -export * from './node-diamond'; -export * from './node-ellipse'; -export * from './node-hexagon'; -export * from './node-image'; -export * from './node-rect'; -export * from './node-star'; -export * from './node-triangle'; -export * from './shape-badge'; -export * from './shape-icon'; -export * from './shape-label'; diff --git a/packages/g6/__tests__/demo/static/controller-element-visibility.ts b/packages/g6/__tests__/demo/static/controller-element-visibility.ts deleted file mode 100644 index e233b445ca7..00000000000 --- a/packages/g6/__tests__/demo/static/controller-element-visibility.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; - -export const controllerElementVisibility: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 50, y: 50 } }, - { id: 'node-2', style: { x: 200, y: 50 } }, - { id: 'node-3', style: { x: 125, y: 150, opacity: 0.5 } }, - ], - edges: [ - { source: 'node-1', target: 'node-2' }, - { source: 'node-2', target: 'node-3', style: { opacity: 0.5 } }, - { source: 'node-3', target: 'node-1' }, - ], - }, - theme: 'light', - node: { - style: { - size: 20, - }, - }, - }; - - const graph = new Graph(options); - await graph.render(); - - const show = () => graph.showElement(['node-3', 'node-2-node-3', 'node-3-node-1']); - const hide = () => graph.hideElement(['node-3', 'node-2-node-3', 'node-3-node-1']); - - controllerElementVisibility.form = (panel) => [panel.add({ show }, 'show'), panel.add({ hide }, 'hide')]; - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-element-z-index.ts b/packages/g6/__tests__/demo/static/controller-element-z-index.ts deleted file mode 100644 index f8ed0dafb2b..00000000000 --- a/packages/g6/__tests__/demo/static/controller-element-z-index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; - -export const controllerElementZIndex: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 150, y: 150, color: 'red' } }, - { id: 'node-2', style: { x: 175, y: 175, color: 'green' } }, - { id: 'node-3', style: { x: 200, y: 200, color: 'blue' } }, - ], - }, - theme: 'light', - node: { - style: { - size: 50, - }, - }, - }; - - const graph = new Graph(options); - await graph.render(); - const front = () => graph.frontElement('node-2'); - const to = (zIndex: number) => graph.setElementZIndex('node-2', zIndex); - - controllerElementZIndex.form = (panel) => [ - panel.add({ front }, 'front').name('Bring Element To Front'), - panel.add({ to: 0 }, 'to', -10, 10, 1).onChange((zIndex: number) => to(zIndex)), - ]; - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-element.ts b/packages/g6/__tests__/demo/static/controller-element.ts deleted file mode 100644 index b7ce5da9db8..00000000000 --- a/packages/g6/__tests__/demo/static/controller-element.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; - -export const controllerElement: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 50, y: 50 } }, - { id: 'node-2', style: { x: 200, y: 50 } }, - { id: 'node-3', style: { x: 125, y: 150 } }, - ], - edges: [ - { source: 'node-1', target: 'node-2' }, - { source: 'node-2', target: 'node-3' }, - { source: 'node-3', target: 'node-1' }, - ], - }, - node: { - style: { - size: 20, - }, - }, - edge: { - style: {}, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-antv-dagre.ts b/packages/g6/__tests__/demo/static/controller-layout-antv-dagre.ts deleted file mode 100644 index 6f112322371..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-antv-dagre.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/dagre.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutAntVDagre: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data, - theme: 'light', - layout: { - type: 'antv-dagre', - nodeSize: 10, - ranksep: 20, - controlPoints: true, - begin: [20, 20], - }, - node: { style: { size: 20 } }, - edge: { - style: { - type: 'polyline', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-circular.ts b/packages/g6/__tests__/demo/static/controller-layout-circular.ts deleted file mode 100644 index afd3f9bebdf..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-circular.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/soccer.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutCircular: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data, - theme: 'light', - layout: { - type: 'circular', - radius: 200, - }, - node: { style: { size: 20 } }, - edge: { - style: { - type: 'line', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-compact-box.ts b/packages/g6/__tests__/demo/static/controller-layout-compact-box.ts deleted file mode 100644 index 118d85a76a9..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-compact-box.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { G6Spec, NodeData } from '@/src'; -import { Graph, Utils } from '@/src'; -import tree from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutCompactBox: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - x: 50, - y: 300, - zoom: 0.5, - data: Utils.treeToGraphData(tree), - theme: 'light', - layout: { - type: 'compact-box', - direction: 'LR', - getId: function getId(d: NodeData) { - return d.id; - }, - getHeight: function getHeight() { - return 16; - }, - getVGap: function getVGap() { - return 10; - }, - getHGap: function getHGap() { - return 100; - }, - getWidth: function getWidth(d: NodeData) { - return d.id.toString().length + 20; - }, - }, - node: { - style: { - size: 20, - labelText: (data) => data.id, - labelMaxWidth: 250, - labelPlacement: 'right', - labelOffsetX: 10, - }, - }, - edge: { - style: { - type: 'polyline', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-d3-force.ts b/packages/g6/__tests__/demo/static/controller-layout-d3-force.ts deleted file mode 100644 index f7ce90f925f..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-d3-force.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/soccer.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutD3Force: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data, - theme: 'light', - layout: { - type: 'd3force', - preventOverlap: true, - nodeSize: 20, - }, - node: { style: { size: 20 } }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-dendrogram.ts b/packages/g6/__tests__/demo/static/controller-layout-dendrogram.ts deleted file mode 100644 index c2a22d70c9e..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-dendrogram.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph, Utils } from '@/src'; -import tree from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutDendrogram: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - x: -200, - y: 350, - zoom: 0.5, - data: Utils.treeToGraphData(tree), - theme: 'light', - layout: { - type: 'dendrogram', - direction: 'LR', - nodeSep: 36, - rankSep: 250, - }, - node: { - style: { - size: 20, - labelText: (data) => data.id, - labelPlacement: 'right', - labelMaxWidth: 200, - ports: [ - { - placement: 'right', - }, - { - placement: 'left', - }, - ], - }, - }, - edge: { - style: { - type: 'cubic-horizontal', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-force.ts b/packages/g6/__tests__/demo/static/controller-layout-force.ts deleted file mode 100644 index 1e456f3c8f3..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-force.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutForce: STDTestCase = async (context) => { - const colors = { a: '#cd2f3b', b: '#005cc5', c: '#1e7834', d: '#ff9f45' }; - const options: G6Spec = { - ...context, - data, - theme: 'light', - layout: { - type: 'force', - linkDistance: 50, - clustering: true, - dimensions: 2, - nodeClusterBy: 'cluster', - clusterNodeStrength: 100, - }, - node: { - style: { - size: 20, - lineWidth: 0, - fill: (data) => colors[data.style!.cluster as keyof typeof colors], - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; - -controllerLayoutForce.skip = true; diff --git a/packages/g6/__tests__/demo/static/controller-layout-grid.ts b/packages/g6/__tests__/demo/static/controller-layout-grid.ts deleted file mode 100644 index 31e4249e109..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-grid.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/soccer.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutGrid: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - padding: 0, - data, - theme: 'light', - layout: { - type: 'grid', - }, - node: { style: { size: 20 } }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-mindmap.ts b/packages/g6/__tests__/demo/static/controller-layout-mindmap.ts deleted file mode 100644 index 3dda7798a30..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-mindmap.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph, Utils } from '@/src'; -import tree from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutMindmap: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - x: 350, - y: 100, - zoom: 0.4, - data: Utils.treeToGraphData(tree), - theme: 'light', - layout: { - type: 'mindmap', - direction: 'H', - getHeight: () => { - return 16; - }, - getWidth: () => { - return 16; - }, - getVGap: () => { - return 10; - }, - getHGap: () => { - return 100; - }, - getSide: undefined, - }, - node: { style: { size: 20 } }, - edge: { - style: { - type: 'polyline', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/controller-layout-radial.ts b/packages/g6/__tests__/demo/static/controller-layout-radial.ts deleted file mode 100644 index d975c18c86e..00000000000 --- a/packages/g6/__tests__/demo/static/controller-layout-radial.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; - -export const controllerLayoutRadial: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - padding: 0, - data: data, - theme: 'light', - layout: { - type: 'radial', - unitRadius: 50, - }, - node: { style: { size: 20 } }, - edge: { - style: { - type: 'polyline', - }, - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/edge-polyline.ts b/packages/g6/__tests__/demo/static/edge-polyline.ts deleted file mode 100644 index bcc6853675e..00000000000 --- a/packages/g6/__tests__/demo/static/edge-polyline.ts +++ /dev/null @@ -1,335 +0,0 @@ -import { Polyline } from '@/src/elements/edges'; -import type { RectStyleProps } from '@/src/elements/nodes'; -import { Circle, Rect } from '@/src/elements/nodes'; -import type { StaticTestCase } from '../types'; - -export const edgePolyline: StaticTestCase = async (context) => { - const { container } = context; - - const commonNodeStyle: RectStyleProps = { - size: [50, 20], - fill: '#f8f8f8', - stroke: '#8b9baf', - labelPlacement: 'center', - labelFill: '#8b9baf', - }; - - const commonCPStyle = { - size: 4, - fill: '#1890FF', - zIndex: 5, - }; - - const node0 = container.appendChild( - new Rect({ - id: 'node-0', - style: { - x: 50, - y: 40, - ...commonNodeStyle, - labelText: 'Loop', - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node0, - targetNode: node0, - stroke: '#1890FF', - loopPlacement: 'top', - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node0, - targetNode: node0, - stroke: '#1890FF', - loopPlacement: 'bottom-right', - }, - }), - ); - - const node01 = container.appendChild( - new Rect({ - id: 'node-0-1', - style: { - x: 150, - y: 40, - ...commonNodeStyle, - labelText: 'Loop', - port: true, - ports: [ - { key: 'top', placement: [0, 0.5], r: 2, fill: '#31d0c6' }, - { - key: 'left', - placement: [0.5, 0], - r: 2, - fill: '#31d0c6', - }, - ], - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node01, - targetNode: node01, - sourcePort: 'top', - targetPort: 'left', - stroke: '#1890FF', - loopPlacement: 'bottom-left', - }, - }), - ); - - const node02 = container.appendChild( - new Rect({ - id: 'node-0-2', - style: { - x: 250, - y: 40, - ...commonNodeStyle, - labelText: 'Loop', - port: true, - ports: [{ key: 'top', placement: [0.5, 0], r: 2, fill: '#31d0c6' }], - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node02, - targetNode: node02, - sourcePort: 'top', - stroke: '#1890FF', - }, - }), - ); - - const node1 = container.appendChild( - new Rect({ - id: 'node-1', - style: { - x: 50, - y: 120, - labelText: '1', - ...commonNodeStyle, - }, - }), - ); - - const node2 = container.appendChild( - new Rect({ - id: 'node-2', - style: { - x: 150, - y: 75, - labelText: '2', - ...commonNodeStyle, - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node1, - targetNode: node2, - stroke: '#1890FF', - - router: true, - }, - }), - ); - - const node3 = container.appendChild( - new Rect({ - id: 'node-3', - style: { - x: 50, - y: 220, - labelText: '3', - ...commonNodeStyle, - }, - }), - ); - - const node4 = container.appendChild( - new Rect({ - id: 'node-4', - style: { - x: 150, - y: 175, - labelText: '4', - ...commonNodeStyle, - }, - }), - ); - - container.appendChild( - new Circle({ - id: 'controlpoint-1', - style: { - x: 100, - y: 175, - size: 4, - fill: '#1890FF', - zIndex: 5, - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node3, - targetNode: node4, - stroke: '#1890FF', - - controlPoints: [[100, 175]], - router: false, - }, - }), - ); - - const node5 = container.appendChild( - new Rect({ - id: 'node-5', - style: { - x: 50, - y: 320, - labelText: '5', - ...commonNodeStyle, - }, - }), - ); - - const node6 = container.appendChild( - new Rect({ - id: 'node-6', - style: { - x: 150, - y: 275, - labelText: '6', - ...commonNodeStyle, - }, - }), - ); - - container.appendChild( - new Circle({ - id: 'controlpoint-2', - style: { - x: 100, - y: 300, - ...commonCPStyle, - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node5, - targetNode: node6, - stroke: '#1890FF', - - controlPoints: [[100, 300]], - router: true, - }, - }), - ); - - const node7 = container.appendChild( - new Rect({ - id: 'node-7', - style: { - x: 50, - y: 420, - labelText: '7', - ...commonNodeStyle, - ports: [{ key: 'top', placement: [0.3, 0], r: 2, fill: '#31d0c6' }], - }, - }), - ); - - const node8 = container.appendChild( - new Rect({ - id: 'node-8', - style: { - x: 150, - y: 375, - labelText: '8', - ...commonNodeStyle, - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node7, - targetNode: node8, - stroke: '#1890FF', - - router: true, - }, - }), - ); - - const node9 = container.appendChild( - new Rect({ - id: 'node-9', - style: { - x: 250, - y: 420, - labelText: '9', - ...commonNodeStyle, - }, - }), - ); - - const node10 = container.appendChild( - new Rect({ - id: 'node-10', - style: { - x: 350, - y: 375, - labelText: '10', - ...commonNodeStyle, - size: 50, - }, - }), - ); - - container.appendChild( - new Circle({ - id: 'controlpoint-2', - style: { - x: 340, - y: 390, - ...commonCPStyle, - }, - }), - ); - - container.appendChild( - new Polyline({ - style: { - sourceNode: node9, - targetNode: node10, - controlPoints: [[340, 390]], - stroke: '#1890FF', - router: true, - }, - }), - ); -}; diff --git a/packages/g6/__tests__/demo/static/edge-port.ts b/packages/g6/__tests__/demo/static/edge-port.ts deleted file mode 100644 index 8b1466ea5d8..00000000000 --- a/packages/g6/__tests__/demo/static/edge-port.ts +++ /dev/null @@ -1,501 +0,0 @@ -import { Cubic, Line } from '@/src/elements/edges'; -import { Circle, Star } from '@/src/elements/nodes'; -import type { StaticTestCase } from '../types'; - -export const edgePort: StaticTestCase = async (context) => { - const { container } = context; - - const node1 = container.appendChild( - new Circle({ - id: 'node-1', - style: { - x: 50, - y: 50, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - const node2 = container.appendChild( - new Circle({ - id: 'node-2', - style: { - x: 200, - y: 50, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node1, - targetNode: node2, - stroke: '#1890FF', - lineWidth: 2, - labelText: 'sourcePort❓ targetPort❓', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - endArrow: true, - }, - }), - ); - - const node3 = container.appendChild( - new Circle({ - id: 'node-3', - style: { - x: 50, - y: 150, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, fill: '#31d0c6' }, - { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node4 = container.appendChild( - new Circle({ - id: 'node-4', - style: { - x: 200, - y: 150, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node3, - targetNode: node4, - sourcePort: 'right', - targetPort: 'bottom', - lineWidth: 2, - labelText: 'sourcePort✅ targetPort✅', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node5 = container.appendChild( - new Circle({ - id: 'node-5', - style: { - x: 50, - y: 250, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node6 = container.appendChild( - new Circle({ - id: 'node-6', - style: { - x: 200, - y: 250, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node5, - targetNode: node6, - lineWidth: 2, - labelText: 'sourcePort✖️ targetPort✖️', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node7 = container.appendChild( - new Circle({ - id: 'node-7', - style: { - x: 50, - y: 350, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node8 = container.appendChild( - new Circle({ - id: 'node-8', - style: { - x: 200, - y: 350, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node7, - targetNode: node8, - targetPort: 'bottom', - lineWidth: 2, - labelText: 'sourcePort✖️ targetPort✅', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node9 = container.appendChild( - new Circle({ - id: 'node-9', - style: { - x: 50, - y: 450, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'left', placement: [0, 0.5], r: 4, fill: '#31d0c6' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node10 = container.appendChild( - new Circle({ - id: 'node-10', - style: { - x: 200, - y: 450, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node9, - targetNode: node10, - sourcePort: 'left', - lineWidth: 2, - labelText: 'sourcePort✅ targetPort✖️', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node11 = container.appendChild( - new Circle({ - id: 'node-11', - style: { - x: 300, - y: 50, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - const node12 = container.appendChild( - new Circle({ - id: 'node-12', - style: { - x: 450, - y: 50, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node11, - targetNode: node12, - lineWidth: 2, - labelText: 'sourcePort❓ targetPort✖️', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node13 = container.appendChild( - new Circle({ - id: 'node-13', - style: { - x: 300, - y: 150, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - const node14 = container.appendChild( - new Circle({ - id: 'node-14', - style: { - x: 450, - y: 150, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, fill: '#31d0c6' }, - ], - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node13, - targetNode: node14, - targetPort: 'right', - lineWidth: 2, - labelText: 'sourcePort❓ targetPort✅', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node15 = container.appendChild( - new Circle({ - id: 'node-15', - style: { - x: 300, - y: 250, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node16 = container.appendChild( - new Circle({ - id: 'node-16', - style: { - x: 450, - y: 250, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node15, - targetNode: node16, - lineWidth: 2, - labelText: 'sourcePort✖️ targetPort❓', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node17 = container.appendChild( - new Circle({ - id: 'node-17', - style: { - x: 300, - y: 350, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node18 = container.appendChild( - new Circle({ - id: 'node-18', - style: { - x: 450, - y: 350, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - container.appendChild( - new Line({ - style: { - sourceNode: node17, - targetNode: node18, - sourcePort: 'bottom', - lineWidth: 2, - labelText: 'sourcePort✅ targetPort❓', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); - - const node19 = container.appendChild( - new Circle({ - id: 'node-19', - style: { - x: 300, - y: 450, - size: 50, - fill: '#f8f8f8', - stroke: '#8b9baf', - ports: [ - { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, - { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, - ], - }, - }), - ); - - const node20 = container.appendChild( - new Star({ - id: 'node-20', - style: { - x: 450, - y: 450, - size: 50, - innerR: 10, - fill: '#f8f8f8', - stroke: '#8b9baf', - }, - }), - ); - - container.appendChild( - new Cubic({ - style: { - sourceNode: node19, - targetNode: node20, - sourcePort: 'bottom', - lineWidth: 2, - labelText: 'sourcePort✅ targetPort❓', - labelFontSize: 12, - labelMaxLines: 2, - labelWordWrap: true, - labelWordWrapWidth: 100, - stroke: '#1890FF', - endArrow: true, - }, - }), - ); -}; diff --git a/packages/g6/__tests__/demo/static/graph-element.ts b/packages/g6/__tests__/demo/static/graph-element.ts deleted file mode 100644 index 746451e1d13..00000000000 --- a/packages/g6/__tests__/demo/static/graph-element.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import { idOf } from '../../../src/utils/id'; -import type { STDTestCase } from '../types'; - -export const graphElement: STDTestCase = async (context) => { - const options: G6Spec = { - ...context, - data: { - nodes: [ - { id: 'node-1', style: { x: 100, y: 100, fill: 'red', stroke: 'pink', lineWidth: 1 }, data: { value: 100 } }, - { id: 'node-2', style: { x: 150, y: 100 }, data: { value: 150 } }, - { id: 'node-3', style: { x: 125, y: 150, parentId: 'combo-1', states: ['selected'] }, data: { value: 150 } }, - ], - edges: [ - { id: 'edge-1', source: 'node-1', target: 'node-2', data: { weight: 250 } }, - { - id: 'edge-2', - source: 'node-2', - target: 'node-3', - style: { lineWidth: 5, states: ['active', 'selected'] }, - data: { weight: 300 }, - }, - ], - combos: [{ id: 'combo-1' }], - }, - node: { - style: { - fill: (datum) => ((datum?.data?.value as number) > 100 ? 'red' : 'blue'), - border: (datum: any, index: number) => (index % 2 === 0 ? 0 : 10), - }, - state: { - selected: { - fill: (datum) => ((datum?.data?.value as number) > 100 ? 'purple' : 'cyan'), - }, - }, - palette: 'spectral', - }, - edge: { - style: {}, - state: { - selected: { - stroke: 'red', - }, - active: { - stroke: 'pink', - lineWidth: 4, - }, - }, - palette: { type: 'group', color: 'oranges', field: (d) => idOf(d).toString(), invert: true }, - }, - combo: { - style: {}, - state: {}, - palette: 'blues', - }, - }; - - const graph = new Graph(options); - - await graph.render(); - - return graph; -}; diff --git a/packages/g6/__tests__/demo/static/index.ts b/packages/g6/__tests__/demo/static/index.ts deleted file mode 100644 index b960964b246..00000000000 --- a/packages/g6/__tests__/demo/static/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './common'; - -/** - * 仅可在浏览器环境下访问的用例 - * - * Cases that can only be accessed in the browser environment - */ -export * from './controller-layout-forceatlas2-wasm'; -export * from './controller-layout-fruchterman-gpu'; -export * from './controller-layout-fruchterman-wasm'; diff --git a/packages/g6/__tests__/demo/static/layered-canvas.ts b/packages/g6/__tests__/demo/static/layered-canvas.ts deleted file mode 100644 index b7210d3f0e0..00000000000 --- a/packages/g6/__tests__/demo/static/layered-canvas.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Circle, Rect } from '@antv/g'; -import type { StaticTestCase } from '../types'; - -export const layeredCanvas: StaticTestCase = async (context) => { - const { container } = context; - - const circle = new Circle({ - style: { - cx: 50, - cy: 50, - r: 25, - fill: 'pink', - }, - }); - - const rect = new Rect({ - style: { - x: 100, - y: 100, - width: 50, - height: 50, - fill: 'purple', - }, - }); - - container.appendChild(circle); - container.appendChild(rect); - - return; -}; diff --git a/packages/g6/__tests__/demo/static/shape-badge.ts b/packages/g6/__tests__/demo/static/shape-badge.ts deleted file mode 100644 index 05dc5acd237..00000000000 --- a/packages/g6/__tests__/demo/static/shape-badge.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Badge } from '@/src/elements/shapes'; -import type { StaticTestCase } from '../types'; - -export const shapeBadge: StaticTestCase = async (context) => { - const { container } = context; - - const badge1 = new Badge({ - style: { - text: 'Important', - x: 100, - y: 50, - fill: 'white', - textBaseline: 'top', - backgroundFill: '#e66c5b', - }, - }); - - const badge2 = new Badge({ - style: { - text: 'A', - x: 100, - y: 100, - padding: [5, 10], - fill: 'white', - textBaseline: 'top', - backgroundFill: '#8291b2', - }, - }); - - const badge3 = new Badge({ - style: { - x: 100, - y: 150, - text: 'Notice', - fontSize: 10, - padding: [3, 8], - fill: 'white', - textBaseline: 'top', - backgroundFill: '#ff8c00', - }, - }); - - const badge4 = new Badge({ - style: { - text: 'Important', - x: 100, - y: 200, - fill: 'white', - textBaseline: 'top', - backgroundFill: '#e66c5b', - }, - }); - - container.appendChild(badge1); - container.appendChild(badge2); - container.appendChild(badge3); - container.appendChild(badge4); - - badge4.update({ - text: 'Update Badge Text', - backgroundFill: 'pink', - opacity: 0.4, - stroke: 'black', - }); -}; diff --git a/packages/g6/__tests__/demo/static/shape-icon.ts b/packages/g6/__tests__/demo/static/shape-icon.ts deleted file mode 100644 index 00d6f27c408..00000000000 --- a/packages/g6/__tests__/demo/static/shape-icon.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Icon } from '@/src/elements/shapes'; -import type { StaticTestCase } from '../types'; - -export const shapeIcon: StaticTestCase = async (context) => { - const { container } = context; - - const i1 = new Icon({ - style: { - text: 'text icon', - fontSize: 24, - fontWeight: 400, - fill: 'black', - x: 50, - y: 50, - }, - }); - - const i2 = new Icon({ - style: { - src: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ', - width: 128, - height: 128, - x: 150, - y: 150, - stroke: 'pink', - }, - }); - - container.appendChild(i1); - container.appendChild(i2); -}; diff --git a/packages/g6/__tests__/demo/static/shape-label.ts b/packages/g6/__tests__/demo/static/shape-label.ts deleted file mode 100644 index 0d32a6689d8..00000000000 --- a/packages/g6/__tests__/demo/static/shape-label.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Label } from '@/src/elements/shapes'; -import type { StaticTestCase } from '../types'; - -export const shapeLabel: StaticTestCase = async (context) => { - const { container } = context; - - const label1 = new Label({ - style: { - text: 'label1 text', - fontSize: 14, - fill: 'black', - x: 50, - y: 50, - }, - }); - - const label2 = new Label({ - style: { - text: 'label2 text', - fontSize: 20, - x: 50, - y: 150, - stroke: 'pink', - backgroundLineWidth: 2, - backgroundStroke: 'pink', - }, - }); - - const label3 = new Label({ - style: { - text: 'label3 text', - fontSize: 32, - x: 50, - y: 250, - stroke: 'pink', - fill: 'red', - backgroundLineWidth: 2, - backgroundOpacity: 0.5, - backgroundStroke: 'gold', - }, - }); - - const label4 = new Label({ - style: { - text: 'Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text...', - x: 50, - y: 350, - fill: '#e45454', - wordWrap: true, - maxLines: 2, - cursor: 'pointer', - wordWrapWidth: 250, - textOverflow: '...', - textBaseline: 'middle', - backgroundFill: '#fce9e9', - backgroundLineCap: 'butt', - backgroundLineDash: [5, 5], - backgroundStroke: '#e45454', - }, - }); - - const label5 = new Label({ - style: { - text: 'label1 text', - fontSize: 14, - fill: 'black', - x: 150, - y: 50, - backgroundFill: 'pink', - transform: 'rotate(45deg)', - }, - }); - - container.appendChild(label1); - container.appendChild(label2); - container.appendChild(label3); - container.appendChild(label4); - container.appendChild(label5); -}; diff --git a/packages/g6/__tests__/demo/types.ts b/packages/g6/__tests__/demo/types.ts deleted file mode 100644 index 366992c46b6..00000000000 --- a/packages/g6/__tests__/demo/types.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { G6Spec } from '@/src'; -import { Graph } from '@/src'; -import type { Canvas } from '@/src/runtime/canvas'; -import type { IAnimation } from '@antv/g'; -import type { Controller, GUI } from 'lil-gui'; - -type TestCaseContext = { - container: Canvas; - animation: boolean; - theme: string; -}; - -export type TestCase = StaticTestCase | AnimationTestCase; - -export interface StaticTestCase extends BaseTestCase { - (context: TestCaseContext): Promise; -} - -export interface AnimationTestCase extends BaseTestCase { - (context: TestCaseContext): Promise; - /** - * 检查的动画时间 - * - * Animation time to check - */ - times: number[]; -} - -export interface BaseTestCase { - only?: boolean; - skip?: boolean; - form?: (gui: GUI) => Controller[]; -} - -export interface STDTestCase extends BaseTestCase { - (context: STDTestCaseContext): Promise; -} - -export type STDTestCaseContext = G6Spec; diff --git a/packages/g6/__tests__/demos/animation-element-edge-cubic.ts b/packages/g6/__tests__/demos/animation-element-edge-cubic.ts new file mode 100644 index 00000000000..fbecba73f1e --- /dev/null +++ b/packages/g6/__tests__/demos/animation-element-edge-cubic.ts @@ -0,0 +1,50 @@ +import { Graph } from '@/src'; + +export const animationElementEdgeCubic: TestCase = async (context) => { + const graph = new Graph({ + ...context, + data: { + nodes: [ + { id: 'node-1', style: { x: 100, y: 100 } }, + { id: 'node-2', style: { x: 350, y: 150 } }, + ], + edges: [ + { + id: 'edge-1', + source: 'node-1', + target: 'node-2', + style: { + curveOffset: 30, + }, + }, + ], + }, + edge: { + style: { + type: 'cubic', + lineWidth: 2, + stroke: '#1890FF', + labelText: 'cubic-edge', + labelFontSize: 12, + endArrow: true, + }, + }, + }); + + await graph.draw(); + + animationElementEdgeCubic.form = (panel) => [ + panel.add( + { + Play: () => { + graph.updateNodeData([{ id: 'node-2', style: { y: 300 } }]); + graph.updateEdgeData([{ id: 'edge-1', style: { curveOffset: 60 } }]); + graph.draw(); + }, + }, + 'Play', + ), + ]; + + return graph; +}; diff --git a/packages/g6/__tests__/demos/animation-element-edge-line.ts b/packages/g6/__tests__/demos/animation-element-edge-line.ts new file mode 100644 index 00000000000..5cbf120e9bf --- /dev/null +++ b/packages/g6/__tests__/demos/animation-element-edge-line.ts @@ -0,0 +1,49 @@ +import { Graph } from '@/src'; + +export const animationEdgeLine: TestCase = async (context) => { + const graph = new Graph({ + ...context, + data: { + nodes: [ + { id: 'node-1', style: { x: 100, y: 150 } }, + { id: 'node-2', style: { x: 300, y: 200 } }, + ], + edges: [{ id: 'edge-1', source: 'node-1', target: 'node-2' }], + }, + edge: { + style: { + lineWidth: 2, + lineDash: [10, 10], + stroke: '#1890FF', + halo: true, + haloOpacity: 0.25, + haloLineWidth: 12, + label: true, + labelText: 'line-edge', + labelFontSize: 12, + labelFill: '#000', + labelPadding: 0, + startArrow: true, + startArrowType: 'circle', + endArrow: true, + endArrowFill: 'red', + }, + }, + }); + + await graph.render(); + + animationEdgeLine.form = (panel) => [ + panel.add( + { + Play: () => { + graph.updateNodeData([{ id: 'node-2', style: { x: 450, y: 350 } }]); + graph.draw(); + }, + }, + 'Play', + ), + ]; + + return graph; +}; diff --git a/packages/g6/__tests__/demos/animation-element-edge-quadratic.ts b/packages/g6/__tests__/demos/animation-element-edge-quadratic.ts new file mode 100644 index 00000000000..7949514703c --- /dev/null +++ b/packages/g6/__tests__/demos/animation-element-edge-quadratic.ts @@ -0,0 +1,46 @@ +import { Graph } from '@/src'; + +export const animationElementEdgeQuadratic: TestCase = async (context) => { + const graph = new Graph({ + ...context, + data: { + nodes: [ + { id: 'node-1', style: { x: 100, y: 150 } }, + { id: 'node-2', style: { x: 300, y: 200 } }, + ], + edges: [ + { + id: 'edge-1', + source: 'node-1', + target: 'node-2', + }, + ], + }, + edge: { + style: { + type: 'quadratic', + lineWidth: 2, + stroke: '#1890FF', + labelText: 'quadratic-edge', + labelFontSize: 12, + endArrow: true, + }, + }, + }); + + await graph.draw(); + + animationElementEdgeQuadratic.form = (panel) => [ + panel.add( + { + Play: () => { + graph.updateNodeData([{ id: 'node-2', style: { x: 450, y: 350 } }]); + graph.draw(); + }, + }, + 'Play', + ), + ]; + + return graph; +}; diff --git a/packages/g6/__tests__/demo/static/controller-element-position.ts b/packages/g6/__tests__/demos/animation-element-position.ts similarity index 70% rename from packages/g6/__tests__/demo/static/controller-element-position.ts rename to packages/g6/__tests__/demos/animation-element-position.ts index f74e1930e1c..f81dc89886b 100644 --- a/packages/g6/__tests__/demo/static/controller-element-position.ts +++ b/packages/g6/__tests__/demos/animation-element-position.ts @@ -1,8 +1,7 @@ import type { G6Spec } from '@/src'; import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; -export const controllerElementPosition: StaticTestCase = async (context) => { +export const animationElementPosition: TestCase = async (context) => { const options: G6Spec = { ...context, data: { @@ -26,7 +25,6 @@ export const controllerElementPosition: StaticTestCase = async (context) => { { source: 'node-5', target: 'node-6' }, ], }, - theme: 'light', node: { style: { size: 20, @@ -37,15 +35,20 @@ export const controllerElementPosition: StaticTestCase = async (context) => { const graph = new Graph(options); await graph.render(); - graph.translateElementTo( - { - 'node-1': [250, 100], - 'node-2': [175, 200], - 'node-3': [325, 200], - 'node-4': [100, 300], - 'node-5': [250, 300], - 'node-6': [400, 300], - }, - context.animation, - ); + const play = () => { + graph.translateElementTo( + { + 'node-1': [250, 100], + 'node-2': [175, 200], + 'node-3': [325, 200], + 'node-4': [100, 300], + 'node-5': [250, 300], + 'node-6': [400, 300], + }, + true, + ); + }; + animationElementPosition.form = (panel) => [panel.add({ play }, 'play').name('Play')]; + + return graph; }; diff --git a/packages/g6/__tests__/demo/animation/controller-element-state.ts b/packages/g6/__tests__/demos/animation-element-state.ts similarity index 59% rename from packages/g6/__tests__/demo/animation/controller-element-state.ts rename to packages/g6/__tests__/demos/animation-element-state.ts index 60ec139d88d..0f71c01539e 100644 --- a/packages/g6/__tests__/demo/animation/controller-element-state.ts +++ b/packages/g6/__tests__/demos/animation-element-state.ts @@ -1,9 +1,6 @@ import { Graph, type G6Spec } from '@/src'; -import type { AnimateEvent } from '@/src/utils/event'; -import type { IAnimation } from '@antv/g'; -import type { AnimationTestCase } from '../types'; -export const controllerElementState: AnimationTestCase = async (context) => { +export const animationElementState: TestCase = async (context) => { const options: G6Spec = { ...context, data: { @@ -59,27 +56,22 @@ export const controllerElementState: AnimationTestCase = async (context) => { const graph = new Graph(options); await graph.render(); - graph.updateData({ - nodes: [ - { id: 'node-1', style: { states: [] } }, - { id: 'node-2', style: { states: ['active'] } }, - { id: 'node-3', style: { states: ['selected'] } }, - ], - edges: [ - { source: 'node-1', target: 'node-2', style: { states: [] } }, - { source: 'node-2', target: 'node-3', style: { states: ['active'] } }, - ], - }); - - const result = new Promise((resolve) => { - graph.once('beforeanimate', (e: AnimateEvent) => { - resolve(e.animation!); + const play = () => { + graph.updateData({ + nodes: [ + { id: 'node-1', style: { states: [] } }, + { id: 'node-2', style: { states: ['active'] } }, + { id: 'node-3', style: { states: ['selected'] } }, + ], + edges: [ + { source: 'node-1', target: 'node-2', style: { states: [] } }, + { source: 'node-2', target: 'node-3', style: { states: ['active'] } }, + ], }); - }); + graph.draw(); + }; - graph.draw(); + animationElementState.form = (panel) => [panel.add({ play }, 'play').name('Play')]; - return await result; + return graph; }; - -controllerElementState.times = [0, 1000]; diff --git a/packages/g6/__tests__/demos/animation-element-style-position.ts b/packages/g6/__tests__/demos/animation-element-style-position.ts new file mode 100644 index 00000000000..df6959be979 --- /dev/null +++ b/packages/g6/__tests__/demos/animation-element-style-position.ts @@ -0,0 +1,46 @@ +import { Graph, type G6Spec } from '@/src'; + +export const animationElementStylePosition: TestCase = async (context) => { + const options: G6Spec = { + ...context, + data: { + nodes: [ + { id: 'node-1', style: { x: 50, y: 50 } }, + { id: 'node-2', style: { x: 200, y: 50 } }, + { id: 'node-3', style: { x: 125, y: 150 } }, + ], + edges: [ + { source: 'node-1', target: 'node-2' }, + { source: 'node-2', target: 'node-3' }, + { source: 'node-3', target: 'node-1' }, + ], + }, + theme: 'light', + node: { + style: { + size: 20, + }, + }, + edge: { + style: {}, + }, + }; + + const graph = new Graph(options); + await graph.render(); + + const play = () => { + graph.addNodeData([ + { id: 'node-4', style: { x: 50, y: 200, color: 'orange' } }, + { id: 'node-5', style: { x: 75, y: 150, color: 'purple' } }, + { id: 'node-6', style: { x: 200, y: 100, color: 'cyan' } }, + ]); + graph.removeNodeData(['node-1']); + graph.updateNodeData([{ id: 'node-2', style: { x: 200, y: 200, stroke: 'green' } }]); + graph.draw(); + }; + + animationElementStylePosition.form = (panel) => [panel.add({ play }, 'play').name('Play')]; + + return graph; +}; diff --git a/packages/g6/__tests__/demo/case/behavior-drag-canvas.ts b/packages/g6/__tests__/demos/behavior-drag-canvas.ts similarity index 82% rename from packages/g6/__tests__/demo/case/behavior-drag-canvas.ts rename to packages/g6/__tests__/demos/behavior-drag-canvas.ts index 98b8d10e70e..b17b9da24f1 100644 --- a/packages/g6/__tests__/demo/case/behavior-drag-canvas.ts +++ b/packages/g6/__tests__/demos/behavior-drag-canvas.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const behaviorDragCanvas: STDTestCase = async (context) => { +export const behaviorDragCanvas: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/behavior-drag-element.ts b/packages/g6/__tests__/demos/behavior-drag-element.ts similarity index 91% rename from packages/g6/__tests__/demo/case/behavior-drag-element.ts rename to packages/g6/__tests__/demos/behavior-drag-element.ts index 4d9dd955381..757460b50b5 100644 --- a/packages/g6/__tests__/demo/case/behavior-drag-element.ts +++ b/packages/g6/__tests__/demos/behavior-drag-element.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const behaviorDragNode: STDTestCase = async (context) => { +export const behaviorDragNode: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/behavior-focus-element.ts b/packages/g6/__tests__/demos/behavior-focus-element.ts similarity index 87% rename from packages/g6/__tests__/demo/case/behavior-focus-element.ts rename to packages/g6/__tests__/demos/behavior-focus-element.ts index dc42d97f9c3..35150bb3d34 100644 --- a/packages/g6/__tests__/demo/case/behavior-focus-element.ts +++ b/packages/g6/__tests__/demos/behavior-focus-element.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const behaviorFocusElement: STDTestCase = async (context) => { +export const behaviorFocusElement: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/behavior-hover-element.ts b/packages/g6/__tests__/demos/behavior-hover-element.ts similarity index 77% rename from packages/g6/__tests__/demo/case/behavior-hover-element.ts rename to packages/g6/__tests__/demos/behavior-hover-element.ts index 34a32f51aca..47480ca1b37 100644 --- a/packages/g6/__tests__/demo/case/behavior-hover-element.ts +++ b/packages/g6/__tests__/demos/behavior-hover-element.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const behaviorHoverElement: STDTestCase = async (context) => { +export const behaviorHoverElement: TestCase = async (context) => { const graph = new Graph({ ...context, data: data, diff --git a/packages/g6/__tests__/demo/case/behavior-zoom-canvas.ts b/packages/g6/__tests__/demos/behavior-zoom-canvas.ts similarity index 93% rename from packages/g6/__tests__/demo/case/behavior-zoom-canvas.ts rename to packages/g6/__tests__/demos/behavior-zoom-canvas.ts index 83f57a48d02..11241dbe7f7 100644 --- a/packages/g6/__tests__/demo/case/behavior-zoom-canvas.ts +++ b/packages/g6/__tests__/demos/behavior-zoom-canvas.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const behaviorZoomCanvas: STDTestCase = async (context) => { +export const behaviorZoomCanvas: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/combo-expand-collapse.ts b/packages/g6/__tests__/demos/combo-expand-collapse.ts similarity index 94% rename from packages/g6/__tests__/demo/case/combo-expand-collapse.ts rename to packages/g6/__tests__/demos/combo-expand-collapse.ts index 2a851e213b7..44ea78ba55e 100644 --- a/packages/g6/__tests__/demo/case/combo-expand-collapse.ts +++ b/packages/g6/__tests__/demos/combo-expand-collapse.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import { isObject } from '@antv/util'; -import type { STDTestCase } from '../types'; -export const comboExpandCollapse: STDTestCase = async (context) => { +export const comboExpandCollapse: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/combo.ts b/packages/g6/__tests__/demos/combo.ts similarity index 97% rename from packages/g6/__tests__/demo/case/combo.ts rename to packages/g6/__tests__/demos/combo.ts index 0edcfe6aafb..7687e08b35d 100644 --- a/packages/g6/__tests__/demo/case/combo.ts +++ b/packages/g6/__tests__/demos/combo.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const combo: STDTestCase = async (context) => { +export const combo: TestCase = async (context) => { const data = { nodes: [ { id: 'node-1', data: {}, style: { parentId: 'combo-2', x: 120, y: 100 } }, diff --git a/packages/g6/__tests__/demo/case/common-graph.ts b/packages/g6/__tests__/demos/common-graph.ts similarity index 78% rename from packages/g6/__tests__/demo/case/common-graph.ts rename to packages/g6/__tests__/demos/common-graph.ts index ba4c5b1a959..46d01e5bfd0 100644 --- a/packages/g6/__tests__/demo/case/common-graph.ts +++ b/packages/g6/__tests__/demos/common-graph.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const commonGraph: STDTestCase = async (context) => { +export const commonGraph: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/static/controller-viewport.ts b/packages/g6/__tests__/demos/controller-viewport.ts similarity index 90% rename from packages/g6/__tests__/demo/static/controller-viewport.ts rename to packages/g6/__tests__/demos/controller-viewport.ts index 3f4c69c48f9..4693a3a9d4b 100644 --- a/packages/g6/__tests__/demo/static/controller-viewport.ts +++ b/packages/g6/__tests__/demos/controller-viewport.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const controllerViewport: STDTestCase = async (context) => { +export const controllerViewport: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-change-type.ts b/packages/g6/__tests__/demos/element-change-type.ts similarity index 90% rename from packages/g6/__tests__/demo/case/element-change-type.ts rename to packages/g6/__tests__/demos/element-change-type.ts index 491e952924a..a9db964a879 100644 --- a/packages/g6/__tests__/demo/case/element-change-type.ts +++ b/packages/g6/__tests__/demos/element-change-type.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementChangeType: STDTestCase = async (context) => { +export const elementChangeType: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/static/edge-arrow.ts b/packages/g6/__tests__/demos/element-edge-arrow.ts similarity index 88% rename from packages/g6/__tests__/demo/static/edge-arrow.ts rename to packages/g6/__tests__/demos/element-edge-arrow.ts index f38d3b2898f..18b998a5b88 100644 --- a/packages/g6/__tests__/demo/static/edge-arrow.ts +++ b/packages/g6/__tests__/demos/element-edge-arrow.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; -export const edgeArrow: StaticTestCase = async (context) => { +export const elementEdgeArrow: TestCase = async (context) => { const edgeIds = [ 'default-arrow', 'triangle-arrow', @@ -42,4 +41,6 @@ export const edgeArrow: StaticTestCase = async (context) => { }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-cubic-horizontal.ts b/packages/g6/__tests__/demos/element-edge-cubic-horizontal.ts similarity index 85% rename from packages/g6/__tests__/demo/static/edge-cubic-horizontal.ts rename to packages/g6/__tests__/demos/element-edge-cubic-horizontal.ts index 80b643f9640..ed86587c77b 100644 --- a/packages/g6/__tests__/demo/static/edge-cubic-horizontal.ts +++ b/packages/g6/__tests__/demos/element-edge-cubic-horizontal.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const edgeCubicHorizontal: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementEdgeCubicHorizontal: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], edges: [ @@ -36,8 +33,7 @@ export const edgeCubicHorizontal: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -60,7 +56,6 @@ export const edgeCubicHorizontal: StaticTestCase = async (context) => { nodesep: 30, ranksep: 150, }, - animation, }); await graph.render(); @@ -71,4 +66,6 @@ export const edgeCubicHorizontal: StaticTestCase = async (context) => { 'line-highlight': 'highlight', 'line-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-cubic-vertical.ts b/packages/g6/__tests__/demos/element-edge-cubic-vertical.ts similarity index 85% rename from packages/g6/__tests__/demo/static/edge-cubic-vertical.ts rename to packages/g6/__tests__/demos/element-edge-cubic-vertical.ts index cf4d57918d7..c7b26e01309 100644 --- a/packages/g6/__tests__/demo/static/edge-cubic-vertical.ts +++ b/packages/g6/__tests__/demos/element-edge-cubic-vertical.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const edgeCubicVertical: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementEdgeCubicVertical: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], edges: [ @@ -36,8 +33,7 @@ export const edgeCubicVertical: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -60,7 +56,6 @@ export const edgeCubicVertical: StaticTestCase = async (context) => { nodesep: 25, ranksep: 150, }, - animation, }); await graph.render(); @@ -71,4 +66,6 @@ export const edgeCubicVertical: StaticTestCase = async (context) => { 'line-highlight': 'highlight', 'line-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-cubic.ts b/packages/g6/__tests__/demos/element-edge-cubic.ts similarity index 84% rename from packages/g6/__tests__/demo/static/edge-cubic.ts rename to packages/g6/__tests__/demos/element-edge-cubic.ts index 8e2b4064240..53d4d9192e0 100644 --- a/packages/g6/__tests__/demo/static/edge-cubic.ts +++ b/packages/g6/__tests__/demos/element-edge-cubic.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const edgeCubic: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementEdgeCubic: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], edges: [ @@ -36,8 +33,7 @@ export const edgeCubic: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, edge: { style: { @@ -52,7 +48,6 @@ export const edgeCubic: StaticTestCase = async (context) => { unitRadius: 220, linkDistance: 220, }, - animation, }); await graph.render(); @@ -63,4 +58,6 @@ export const edgeCubic: StaticTestCase = async (context) => { 'line-highlight': 'highlight', 'line-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-custom-arrow.ts b/packages/g6/__tests__/demos/element-edge-custom-arrow.ts similarity index 88% rename from packages/g6/__tests__/demo/static/edge-custom-arrow.ts rename to packages/g6/__tests__/demos/element-edge-custom-arrow.ts index 4142a4a837c..cd960071c97 100644 --- a/packages/g6/__tests__/demo/static/edge-custom-arrow.ts +++ b/packages/g6/__tests__/demos/element-edge-custom-arrow.ts @@ -1,7 +1,6 @@ -import { Graph } from '../../../src'; -import type { StaticTestCase } from '../types'; +import { Graph } from '../../src'; -export const edgeCustomArrow: StaticTestCase = async (context) => { +export const elementEdgeCustomArrow: TestCase = async (context) => { const data = { nodes: new Array(6).fill(0).map((_, i) => ({ id: `node${i + 1}` })), edges: [ @@ -55,4 +54,6 @@ export const edgeCustomArrow: StaticTestCase = async (context) => { }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-line.ts b/packages/g6/__tests__/demos/element-edge-line.ts similarity index 84% rename from packages/g6/__tests__/demo/static/edge-line.ts rename to packages/g6/__tests__/demos/element-edge-line.ts index 4d54321f2ee..c6c3084415e 100644 --- a/packages/g6/__tests__/demo/static/edge-line.ts +++ b/packages/g6/__tests__/demos/element-edge-line.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const edgeLine: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementEdgeLine: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], edges: [ @@ -36,8 +33,7 @@ export const edgeLine: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, edge: { style: { @@ -52,7 +48,6 @@ export const edgeLine: StaticTestCase = async (context) => { unitRadius: 220, linkDistance: 220, }, - animation, }); await graph.render(); @@ -63,4 +58,6 @@ export const edgeLine: StaticTestCase = async (context) => { 'line-highlight': 'highlight', 'line-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-loop-curve.ts b/packages/g6/__tests__/demos/element-edge-loop-curve.ts similarity index 95% rename from packages/g6/__tests__/demo/static/edge-loop-curve.ts rename to packages/g6/__tests__/demos/element-edge-loop-curve.ts index fd34f84816e..30d2a02ade5 100644 --- a/packages/g6/__tests__/demo/static/edge-loop-curve.ts +++ b/packages/g6/__tests__/demos/element-edge-loop-curve.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; -export const edgeLoopCurve: StaticTestCase = async (context) => { +export const elementEdgeLoopCurve: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3-ports' }, { id: 'node4-ports' }], edges: [ @@ -110,4 +109,6 @@ export const edgeLoopCurve: StaticTestCase = async (context) => { }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/edge-loop-polyline.ts b/packages/g6/__tests__/demos/element-edge-loop-polyline.ts similarity index 95% rename from packages/g6/__tests__/demo/static/edge-loop-polyline.ts rename to packages/g6/__tests__/demos/element-edge-loop-polyline.ts index 1bef42b8260..5a6e1b9fe13 100644 --- a/packages/g6/__tests__/demo/static/edge-loop-polyline.ts +++ b/packages/g6/__tests__/demos/element-edge-loop-polyline.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; -export const edgeLoopPolyline: StaticTestCase = async (context) => { +export const elementEdgeLoopPolyline: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3-ports' }, { id: 'node4-ports' }], edges: [ @@ -109,4 +108,6 @@ export const edgeLoopPolyline: StaticTestCase = async (context) => { }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/case/edge-polyline.ts b/packages/g6/__tests__/demos/element-edge-polyline-animation.ts similarity index 91% rename from packages/g6/__tests__/demo/case/edge-polyline.ts rename to packages/g6/__tests__/demos/element-edge-polyline-animation.ts index 379216dd216..4eb60602839 100644 --- a/packages/g6/__tests__/demo/case/edge-polyline.ts +++ b/packages/g6/__tests__/demos/element-edge-polyline-animation.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const edgePolyline: STDTestCase = async (context) => { +export const elementEdgePolylineAnimation: TestCase = async (context) => { const data = { nodes: [ { id: 'node-1', style: { x: 200, y: 200 } }, @@ -23,7 +22,7 @@ export const edgePolyline: STDTestCase = async (context) => { await graph.render(); - edgePolyline.form = (panel) => { + elementEdgePolylineAnimation.form = (panel) => { const config = { radius: 0, enableRouter: false, diff --git a/packages/g6/__tests__/demos/element-edge-polyline.ts b/packages/g6/__tests__/demos/element-edge-polyline.ts new file mode 100644 index 00000000000..e74db042e20 --- /dev/null +++ b/packages/g6/__tests__/demos/element-edge-polyline.ts @@ -0,0 +1,162 @@ +import { Graph } from '@/src'; + +export const elementEdgePolyline: TestCase = async (context) => { + const graph = new Graph({ + ...context, + data: { + nodes: [ + { id: 'node-0', style: { x: 50, y: 40, labelText: 'Loop' } }, + { + id: 'node-0-1', + style: { + x: 150, + y: 40, + labelText: 'Loop', + port: true, + ports: [ + { key: 'top', placement: [0, 0.5], r: 2, fill: '#31d0c6' }, + { + key: 'left', + placement: [0.5, 0], + r: 2, + fill: '#31d0c6', + }, + ], + }, + }, + { + id: 'node-0-2', + style: { + x: 250, + y: 40, + labelText: 'Loop', + port: true, + ports: [{ key: 'top', placement: [0.5, 0], r: 2, fill: '#31d0c6' }], + }, + }, + { + id: 'node-1', + style: { x: 50, y: 120, labelText: '1' }, + }, + { + id: 'node-2', + style: { x: 150, y: 75, labelText: '2' }, + }, + { + id: 'node-3', + style: { x: 50, y: 220, labelText: '3' }, + }, + { + id: 'node-4', + style: { x: 150, y: 175, labelText: '4' }, + }, + { + id: 'control-point-1', + style: { x: 100, y: 175, size: 4, type: 'circle' }, + }, + { + id: 'node-5', + style: { x: 50, y: 320, labelText: '5' }, + }, + { + id: 'node-6', + style: { x: 150, y: 275, labelText: '6' }, + }, + { + id: 'control-point-2', + style: { x: 100, y: 300, size: 4, type: 'circle' }, + }, + { + id: 'node-7', + style: { x: 50, y: 420, labelText: '7', ports: [{ key: 'top', placement: [0.3, 0], r: 2, fill: '#31d0c6' }] }, + }, + { + id: 'node-8', + style: { x: 150, y: 375, labelText: '8' }, + }, + { + id: 'node-9', + style: { x: 250, y: 420, labelText: '9' }, + }, + { + id: 'node-10', + style: { x: 350, y: 375, labelText: '10', size: 50 }, + }, + { + id: 'control-point-3', + style: { x: 340, y: 390, size: 4, type: 'circle' }, + }, + ], + edges: [ + { + id: 'edge-1', + source: 'node-0', + target: 'node-0', + style: { loopPlacement: 'top' }, + }, + { + id: 'edge-2', + source: 'node-0', + target: 'node-0', + style: { loopPlacement: 'bottom-right' }, + }, + { + source: 'node-0-1', + target: 'node-0-1', + style: { sourcePort: 'top', targetPort: 'left', loopPlacement: 'bottom-left' }, + }, + { + source: 'node-0-2', + target: 'node-0-2', + style: { sourcePort: 'top' }, + }, + { + source: 'node-1', + target: 'node-2', + style: { router: true }, + }, + { + source: 'node-3', + target: 'node-4', + style: { router: false, controlPoints: [[100, 175]] }, + }, + { + source: 'node-5', + target: 'node-6', + style: { router: true, controlPoints: [[100, 300]] }, + }, + { + source: 'node-7', + target: 'node-8', + style: { router: true }, + }, + { + source: 'node-9', + target: 'node-10', + style: { router: true, controlPoints: [[340, 390]] }, + }, + ], + }, + node: { + style: { + type: (d) => d.style?.type || 'rect', + size: (d) => d.style?.size || [50, 20], + color: '#f8f8f8', + stroke: '#8b9baf', + labelPlacement: 'center', + labelFill: '#8b9baf', + portLineWidth: 0, + }, + }, + edge: { + style: { + type: 'polyline', + color: '#1890FF', + }, + }, + }); + + await graph.render(); + + return graph; +}; diff --git a/packages/g6/__tests__/demos/element-edge-port.ts b/packages/g6/__tests__/demos/element-edge-port.ts new file mode 100644 index 00000000000..f67ce6112f2 --- /dev/null +++ b/packages/g6/__tests__/demos/element-edge-port.ts @@ -0,0 +1,169 @@ +import { Graph } from '@/src'; + +export const elementEdgePort: TestCase = async (context) => { + const nodes: Record = { + 'node-2': { + ports: [ + { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, fill: '#31d0c6' }, + { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-3': { + ports: [ + { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, + ], + }, + 'node-4': { + ports: [ + { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-5': { + ports: [ + { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-6': { + ports: [ + { key: 'left', placement: [0, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-7': { + ports: [ + { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, + ], + }, + 'node-8': { + ports: [ + { key: 'left', placement: [0, 0.5], r: 4, fill: '#31d0c6' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-9': { + ports: [ + { key: 'top', placement: [0.5, 0], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-11': { + ports: [ + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-13': { + ports: [ + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, fill: '#31d0c6' }, + ], + }, + 'node-14': { + ports: [ + { key: 'bottom', placement: [0.5, 1], r: 4, stroke: '#31d0c6', fill: '#fff' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-16': { + ports: [ + { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-18': { + ports: [ + { key: 'bottom', placement: [0.5, 1], r: 4, fill: '#31d0c6' }, + { key: 'right', placement: [1, 0.5], r: 4, stroke: '#31d0c6', fill: '#fff' }, + ], + }, + 'node-19': { + type: 'star', + }, + }; + + const edges: Record = { + 'edge-0': { + labelText: 'sourcePort❓ targetPort❓', + }, + 'edge-1': { + sourcePort: 'right', + targetPort: 'bottom', + labelText: 'sourcePort✅ targetPort✅', + }, + 'edge-2': { + labelText: 'sourcePort✖️ targetPort✖️', + }, + 'edge-3': { + targetPort: 'bottom', + labelText: 'sourcePort✖️ targetPort✅', + }, + 'edge-4': { + sourcePort: 'left', + labelText: 'sourcePort✅ targetPort✖️', + }, + 'edge-5': { + labelText: 'sourcePort❓ targetPort✖️', + }, + 'edge-6': { + targetPort: 'right', + labelText: 'sourcePort❓ targetPort✅', + }, + 'edge-7': { + labelText: 'sourcePort✖️ targetPort❓', + }, + 'edge-8': { + sourcePort: 'bottom', + labelText: 'sourcePort✅ targetPort❓', + }, + 'edge-9': { + type: 'cubic', + sourcePort: 'bottom', + labelText: 'sourcePort✅ targetPort❓', + }, + }; + + const graph = new Graph({ + ...context, + data: { + nodes: Array.from({ length: 20 }).map((_, i) => ({ id: `node-${i}`, style: nodes[`node-${i}`] || {} })), + edges: Array.from({ length: 10 }).map((_, i) => ({ + id: `edge-${i}`, + source: `node-${i * 2}`, + target: `node-${i * 2 + 1}`, + style: edges[`edge-${i}`] || {}, + })), + }, + node: { + style: { + x: (_, index) => [50, 200, 300, 450][index % 4], + y: (_, index) => 50 + Math.floor(index / 4) * 100, + size: 50, + color: '#f8f8f8', + stroke: '#8b9baf', + }, + }, + edge: { + style: { + color: '#1890FF', + lineWidth: 2, + labelFontSize: 12, + labelMaxLines: 2, + labelWordWrap: true, + labelWordWrapWidth: 100, + endArrow: true, + }, + }, + }); + + await graph.render(); + + return graph; +}; diff --git a/packages/g6/__tests__/demo/static/edge-quadratic.ts b/packages/g6/__tests__/demos/element-edge-quadratic.ts similarity index 84% rename from packages/g6/__tests__/demo/static/edge-quadratic.ts rename to packages/g6/__tests__/demos/element-edge-quadratic.ts index d79c469ca36..307cfb700e9 100644 --- a/packages/g6/__tests__/demo/static/edge-quadratic.ts +++ b/packages/g6/__tests__/demos/element-edge-quadratic.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const edgeQuadratic: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementEdgeQuadratic: TestCase = async (context) => { const data = { nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], edges: [ @@ -36,8 +33,7 @@ export const edgeQuadratic: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, edge: { style: { @@ -52,7 +48,6 @@ export const edgeQuadratic: StaticTestCase = async (context) => { unitRadius: 220, linkDistance: 220, }, - animation, }); await graph.render(); @@ -63,4 +58,6 @@ export const edgeQuadratic: StaticTestCase = async (context) => { 'line-highlight': 'highlight', 'line-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/element-label-background.ts b/packages/g6/__tests__/demos/element-label-background.ts similarity index 86% rename from packages/g6/__tests__/demo/static/element-label-background.ts rename to packages/g6/__tests__/demos/element-label-background.ts index 2ea38c178d9..e1fa7af78fe 100644 --- a/packages/g6/__tests__/demo/static/element-label-background.ts +++ b/packages/g6/__tests__/demos/element-label-background.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const elementLabelBackground: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementLabelBackground: TestCase = async (context) => { const data = { nodes: [ { @@ -39,7 +36,7 @@ export const elementLabelBackground: StaticTestCase = async (context) => { }; const graph = new Graph({ - container, + ...context, data, node: { style: { @@ -69,9 +66,9 @@ export const elementLabelBackground: StaticTestCase = async (context) => { }, }, behaviors: ['drag-canvas', 'drag-element'], - animation, - theme, }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/element-label-oversized.ts b/packages/g6/__tests__/demos/element-label-oversized.ts similarity index 87% rename from packages/g6/__tests__/demo/static/element-label-oversized.ts rename to packages/g6/__tests__/demos/element-label-oversized.ts index 9ed42f416a1..d027ced1359 100644 --- a/packages/g6/__tests__/demo/static/element-label-oversized.ts +++ b/packages/g6/__tests__/demos/element-label-oversized.ts @@ -1,9 +1,6 @@ import { Graph } from '@/src'; -import type { StaticTestCase } from '../types'; - -export const elementLabelOversized: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementLabelOversized: TestCase = async (context) => { const data = { nodes: [ { @@ -38,8 +35,7 @@ export const elementLabelOversized: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -73,8 +69,9 @@ export const elementLabelOversized: StaticTestCase = async (context) => { }, }, behaviors: ['drag-element'], - animation, }); await graph.render(); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-circle.ts b/packages/g6/__tests__/demos/element-node-circle.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-circle.ts rename to packages/g6/__tests__/demos/element-node-circle.ts index 38a09e83cf9..53fc340ec77 100644 --- a/packages/g6/__tests__/demo/static/node-circle.ts +++ b/packages/g6/__tests__/demos/element-node-circle.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeCircle: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeCircle: TestCase = async (context) => { const data = { nodes: [ { id: 'circle' }, @@ -20,9 +17,8 @@ export const nodeCircle: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, + ...context, data, - theme, node: { style: { type: 'circle', // 👈🏻 Node shape type. @@ -52,7 +48,6 @@ export const nodeCircle: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -64,4 +59,6 @@ export const nodeCircle: StaticTestCase = async (context) => { 'circle-inactive': 'inactive', 'circle-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-diamond.ts b/packages/g6/__tests__/demos/element-node-diamond.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-diamond.ts rename to packages/g6/__tests__/demos/element-node-diamond.ts index 87ae71c3cc2..068bd66349f 100644 --- a/packages/g6/__tests__/demo/static/node-diamond.ts +++ b/packages/g6/__tests__/demos/element-node-diamond.ts @@ -1,9 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; -export const nodeDiamond: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeDiamond: TestCase = async (context) => { const data = { nodes: [ { id: 'diamond' }, @@ -19,8 +17,7 @@ export const nodeDiamond: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -51,7 +48,6 @@ export const nodeDiamond: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -62,4 +58,6 @@ export const nodeDiamond: StaticTestCase = async (context) => { 'diamond-inactive': 'inactive', 'diamond-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-ellipse.ts b/packages/g6/__tests__/demos/element-node-ellipse.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-ellipse.ts rename to packages/g6/__tests__/demos/element-node-ellipse.ts index da5471a4edf..4e9616fcc5c 100644 --- a/packages/g6/__tests__/demo/static/node-ellipse.ts +++ b/packages/g6/__tests__/demos/element-node-ellipse.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeEllipse: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeEllipse: TestCase = async (context) => { const data = { nodes: [ { id: 'ellipse' }, @@ -20,8 +17,7 @@ export const nodeEllipse: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -52,7 +48,6 @@ export const nodeEllipse: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -64,4 +59,6 @@ export const nodeEllipse: StaticTestCase = async (context) => { 'ellipse-inactive': 'inactive', 'ellipse-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-hexagon.ts b/packages/g6/__tests__/demos/element-node-hexagon.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-hexagon.ts rename to packages/g6/__tests__/demos/element-node-hexagon.ts index 93ba10c5235..c9428d80481 100644 --- a/packages/g6/__tests__/demo/static/node-hexagon.ts +++ b/packages/g6/__tests__/demos/element-node-hexagon.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeHexagon: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeHexagon: TestCase = async (context) => { const data = { nodes: [ { id: 'hexagon' }, @@ -20,8 +17,7 @@ export const nodeHexagon: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -50,7 +46,6 @@ export const nodeHexagon: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -60,4 +55,6 @@ export const nodeHexagon: StaticTestCase = async (context) => { graph.setElementState('hexagon-highlight', 'highlight'); graph.setElementState('hexagon-inactive', 'inactive'); graph.setElementState('hexagon-disabled', 'disabled'); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-image.ts b/packages/g6/__tests__/demos/element-node-image.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-image.ts rename to packages/g6/__tests__/demos/element-node-image.ts index a01275e7f04..c67e7548f8f 100644 --- a/packages/g6/__tests__/demo/static/node-image.ts +++ b/packages/g6/__tests__/demos/element-node-image.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeImage: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeImage: TestCase = async (context) => { const data = { nodes: [ { id: 'image' }, @@ -20,8 +17,7 @@ export const nodeImage: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -56,7 +52,6 @@ export const nodeImage: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -68,4 +63,6 @@ export const nodeImage: StaticTestCase = async (context) => { 'image-inactive': 'inactive', 'image-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-rect.ts b/packages/g6/__tests__/demos/element-node-rect.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-rect.ts rename to packages/g6/__tests__/demos/element-node-rect.ts index aaf5b3a499c..509ad313e61 100644 --- a/packages/g6/__tests__/demo/static/node-rect.ts +++ b/packages/g6/__tests__/demos/element-node-rect.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeRect: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeRect: TestCase = async (context) => { const data = { nodes: [ { id: 'rect' }, @@ -20,8 +17,7 @@ export const nodeRect: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -53,7 +49,6 @@ export const nodeRect: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -65,4 +60,6 @@ export const nodeRect: StaticTestCase = async (context) => { 'rect-inactive': 'inactive', 'rect-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-star.ts b/packages/g6/__tests__/demos/element-node-star.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-star.ts rename to packages/g6/__tests__/demos/element-node-star.ts index 2377b279d9f..688917cbe97 100644 --- a/packages/g6/__tests__/demo/static/node-star.ts +++ b/packages/g6/__tests__/demos/element-node-star.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeStar: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeStar: TestCase = async (context) => { const data = { nodes: [ { id: 'star' }, @@ -20,8 +17,7 @@ export const nodeStar: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -50,7 +46,6 @@ export const nodeStar: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -62,4 +57,6 @@ export const nodeStar: StaticTestCase = async (context) => { 'star-inactive': 'inactive', 'star-disabled': 'disabled', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/static/node-triangle.ts b/packages/g6/__tests__/demos/element-node-triangle.ts similarity index 88% rename from packages/g6/__tests__/demo/static/node-triangle.ts rename to packages/g6/__tests__/demos/element-node-triangle.ts index 378e709b5f4..988ee5d9569 100644 --- a/packages/g6/__tests__/demo/static/node-triangle.ts +++ b/packages/g6/__tests__/demos/element-node-triangle.ts @@ -1,10 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { StaticTestCase } from '../types'; - -export const nodeTriangle: StaticTestCase = async (context) => { - const { container, animation, theme } = context; +export const elementNodeTriangle: TestCase = async (context) => { const data = { nodes: [ { id: 'triangle' }, @@ -19,8 +16,7 @@ export const nodeTriangle: StaticTestCase = async (context) => { }; const graph = new Graph({ - container: container, - theme, + ...context, data, node: { style: { @@ -50,7 +46,6 @@ export const nodeTriangle: StaticTestCase = async (context) => { layout: { type: 'grid', }, - animation, }); await graph.render(); @@ -61,4 +56,6 @@ export const nodeTriangle: StaticTestCase = async (context) => { 'triangle-highlight': 'highlight', 'triangle-inactive': 'inactive', }); + + return graph; }; diff --git a/packages/g6/__tests__/demo/case/element-port.ts b/packages/g6/__tests__/demos/element-port.ts similarity index 95% rename from packages/g6/__tests__/demo/case/element-port.ts rename to packages/g6/__tests__/demos/element-port.ts index 5f999c22d5c..ed7add63b22 100644 --- a/packages/g6/__tests__/demo/case/element-port.ts +++ b/packages/g6/__tests__/demos/element-port.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import { idOf } from '@/src/utils/id'; -import type { STDTestCase } from '../types'; -export const elementPort: STDTestCase = async (context) => { +export const elementPort: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-position-combo.ts b/packages/g6/__tests__/demos/element-position-combo.ts similarity index 88% rename from packages/g6/__tests__/demo/case/element-position-combo.ts rename to packages/g6/__tests__/demos/element-position-combo.ts index 26f9aecb7a6..beb789ef9cf 100644 --- a/packages/g6/__tests__/demo/case/element-position-combo.ts +++ b/packages/g6/__tests__/demos/element-position-combo.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementPositionCombo: STDTestCase = async (context) => { +export const elementPositionCombo: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-position.ts b/packages/g6/__tests__/demos/element-position.ts similarity index 92% rename from packages/g6/__tests__/demo/case/element-position.ts rename to packages/g6/__tests__/demos/element-position.ts index 9a9e75590cd..56f3ef1aae7 100644 --- a/packages/g6/__tests__/demo/case/element-position.ts +++ b/packages/g6/__tests__/demos/element-position.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementPosition: STDTestCase = async (context) => { +export const elementPosition: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-state.ts b/packages/g6/__tests__/demos/element-state.ts similarity index 95% rename from packages/g6/__tests__/demo/case/element-state.ts rename to packages/g6/__tests__/demos/element-state.ts index 0439ff68e50..183d669c3a5 100644 --- a/packages/g6/__tests__/demo/case/element-state.ts +++ b/packages/g6/__tests__/demos/element-state.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementState: STDTestCase = async (context) => { +export const elementState: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-visibility.ts b/packages/g6/__tests__/demos/element-visibility.ts similarity index 92% rename from packages/g6/__tests__/demo/case/element-visibility.ts rename to packages/g6/__tests__/demos/element-visibility.ts index e79ebc25831..d1378a62d47 100644 --- a/packages/g6/__tests__/demo/case/element-visibility.ts +++ b/packages/g6/__tests__/demos/element-visibility.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementVisibility: STDTestCase = async (context) => { +export const elementVisibility: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/element-z-index.ts b/packages/g6/__tests__/demos/element-z-index.ts similarity index 91% rename from packages/g6/__tests__/demo/case/element-z-index.ts rename to packages/g6/__tests__/demos/element-z-index.ts index f45385322f9..38f5e0e8f3c 100644 --- a/packages/g6/__tests__/demo/case/element-z-index.ts +++ b/packages/g6/__tests__/demos/element-z-index.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const elementZIndex: STDTestCase = async (context) => { +export const elementZIndex: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/demo/case/graph-event.ts b/packages/g6/__tests__/demos/graph-event.ts similarity index 91% rename from packages/g6/__tests__/demo/case/graph-event.ts rename to packages/g6/__tests__/demos/graph-event.ts index c88433a1516..85d051efbe6 100644 --- a/packages/g6/__tests__/demo/case/graph-event.ts +++ b/packages/g6/__tests__/demos/graph-event.ts @@ -1,8 +1,7 @@ import { Graph, GraphEvent } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const graphEvent: STDTestCase = async (context) => { +export const graphEvent: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/index.ts b/packages/g6/__tests__/demos/index.ts similarity index 60% rename from packages/g6/__tests__/demo/case/index.ts rename to packages/g6/__tests__/demos/index.ts index 53457f73eeb..1bc24598444 100644 --- a/packages/g6/__tests__/demo/case/index.ts +++ b/packages/g6/__tests__/demos/index.ts @@ -1,3 +1,9 @@ +export * from './animation-element-edge-cubic'; +export * from './animation-element-edge-line'; +export * from './animation-element-edge-quadratic'; +export * from './animation-element-position'; +export * from './animation-element-state'; +export * from './animation-element-style-position'; export * from './behavior-drag-canvas'; export * from './behavior-drag-element'; export * from './behavior-focus-element'; @@ -6,8 +12,30 @@ export * from './behavior-zoom-canvas'; export * from './combo'; export * from './combo-expand-collapse'; export * from './common-graph'; -export * from './edge-polyline'; +export * from './controller-viewport'; export * from './element-change-type'; +export * from './element-edge-arrow'; +export * from './element-edge-cubic'; +export * from './element-edge-cubic-horizontal'; +export * from './element-edge-cubic-vertical'; +export * from './element-edge-custom-arrow'; +export * from './element-edge-line'; +export * from './element-edge-loop-curve'; +export * from './element-edge-loop-polyline'; +export * from './element-edge-polyline'; +export * from './element-edge-polyline-animation'; +export * from './element-edge-port'; +export * from './element-edge-quadratic'; +export * from './element-label-background'; +export * from './element-label-oversized'; +export * from './element-node-circle'; +export * from './element-node-diamond'; +export * from './element-node-ellipse'; +export * from './element-node-hexagon'; +export * from './element-node-image'; +export * from './element-node-rect'; +export * from './element-node-star'; +export * from './element-node-triangle'; export * from './element-port'; export * from './element-position'; export * from './element-position-combo'; @@ -27,14 +55,19 @@ export * from './layout-compact-box-basic'; export * from './layout-compact-box-left-align'; export * from './layout-compact-box-top-to-bottom'; export * from './layout-concentric'; +export * from './layout-d3-force'; export * from './layout-dagre'; export * from './layout-dendrogram-basic'; export * from './layout-dendrogram-tb'; export * from './layout-force'; +export * from './layout-forceatlas2-wasm'; export * from './layout-fruchterman-basic'; export * from './layout-fruchterman-cluster'; export * from './layout-fruchterman-fix'; +export * from './layout-fruchterman-gpu'; +export * from './layout-fruchterman-wasm'; export * from './layout-grid'; +export * from './layout-indented'; export * from './layout-mds'; export * from './layout-mindmap-h'; export * from './layout-mindmap-h-custom-side'; diff --git a/packages/g6/__tests__/demo/case/layout-antv-dagre-flow-combo.ts b/packages/g6/__tests__/demos/layout-antv-dagre-flow-combo.ts similarity index 88% rename from packages/g6/__tests__/demo/case/layout-antv-dagre-flow-combo.ts rename to packages/g6/__tests__/demos/layout-antv-dagre-flow-combo.ts index e522385e012..5c885ca3265 100644 --- a/packages/g6/__tests__/demo/case/layout-antv-dagre-flow-combo.ts +++ b/packages/g6/__tests__/demos/layout-antv-dagre-flow-combo.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/dagre-combo.json'; -import type { STDTestCase } from '../types'; -export const layoutAntVDagreFlowCombo: STDTestCase = async (context) => { +export const layoutAntVDagreFlowCombo: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-antv-dagre-flow.ts b/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts similarity index 86% rename from packages/g6/__tests__/demo/case/layout-antv-dagre-flow.ts rename to packages/g6/__tests__/demos/layout-antv-dagre-flow.ts index 81857cecc59..1ae560c2602 100644 --- a/packages/g6/__tests__/demo/case/layout-antv-dagre-flow.ts +++ b/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/dagre.json'; -import type { STDTestCase } from '../types'; -export const layoutAntVDagreFlow: STDTestCase = async (context) => { +export const layoutAntVDagreFlow: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-circular-basic.ts b/packages/g6/__tests__/demos/layout-circular-basic.ts similarity index 72% rename from packages/g6/__tests__/demo/case/layout-circular-basic.ts rename to packages/g6/__tests__/demos/layout-circular-basic.ts index 7260b7664ae..aca4705f0ac 100644 --- a/packages/g6/__tests__/demo/case/layout-circular-basic.ts +++ b/packages/g6/__tests__/demos/layout-circular-basic.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/circular.json'; -import type { STDTestCase } from '../types'; -export const layoutCircularBasic: STDTestCase = async (context) => { +export const layoutCircularBasic: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-circular-configuration-translate.ts b/packages/g6/__tests__/demos/layout-circular-configuration-translate.ts similarity index 74% rename from packages/g6/__tests__/demo/case/layout-circular-configuration-translate.ts rename to packages/g6/__tests__/demos/layout-circular-configuration-translate.ts index 1740703bc0e..af89163d859 100644 --- a/packages/g6/__tests__/demo/case/layout-circular-configuration-translate.ts +++ b/packages/g6/__tests__/demos/layout-circular-configuration-translate.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/circular.json'; -import type { STDTestCase } from '../types'; -export const layoutCircularConfigurationTranslate: STDTestCase = async (context) => { +export const layoutCircularConfigurationTranslate: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-circular-degree.ts b/packages/g6/__tests__/demos/layout-circular-degree.ts similarity index 81% rename from packages/g6/__tests__/demo/case/layout-circular-degree.ts rename to packages/g6/__tests__/demos/layout-circular-degree.ts index 31de257c466..27488f4e20f 100644 --- a/packages/g6/__tests__/demo/case/layout-circular-degree.ts +++ b/packages/g6/__tests__/demos/layout-circular-degree.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/circular.json'; -import type { STDTestCase } from '../types'; -export const layoutCircularDegree: STDTestCase = async (context) => { +export const layoutCircularDegree: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-circular-division.ts b/packages/g6/__tests__/demos/layout-circular-division.ts similarity index 82% rename from packages/g6/__tests__/demo/case/layout-circular-division.ts rename to packages/g6/__tests__/demos/layout-circular-division.ts index adf16ad391c..4dd455d928a 100644 --- a/packages/g6/__tests__/demo/case/layout-circular-division.ts +++ b/packages/g6/__tests__/demos/layout-circular-division.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/circular.json'; -import type { STDTestCase } from '../types'; -export const layoutCircularDivision: STDTestCase = async (context) => { +export const layoutCircularDivision: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-circular-spiral.ts b/packages/g6/__tests__/demos/layout-circular-spiral.ts similarity index 81% rename from packages/g6/__tests__/demo/case/layout-circular-spiral.ts rename to packages/g6/__tests__/demos/layout-circular-spiral.ts index e80e435d636..0940fb73845 100644 --- a/packages/g6/__tests__/demo/case/layout-circular-spiral.ts +++ b/packages/g6/__tests__/demos/layout-circular-spiral.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/circular.json'; -import type { STDTestCase } from '../types'; -export const layoutCircularSpiral: STDTestCase = async (context) => { +export const layoutCircularSpiral: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-combo-combined.ts b/packages/g6/__tests__/demos/layout-combo-combined.ts similarity index 84% rename from packages/g6/__tests__/demo/case/layout-combo-combined.ts rename to packages/g6/__tests__/demos/layout-combo-combined.ts index 720b5de1155..ac9e564fd99 100644 --- a/packages/g6/__tests__/demo/case/layout-combo-combined.ts +++ b/packages/g6/__tests__/demos/layout-combo-combined.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/combo.json'; -import type { STDTestCase } from '../types'; -export const layoutComboCombined: STDTestCase = async (context) => { +export const layoutComboCombined: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-compact-box-basic.ts b/packages/g6/__tests__/demos/layout-compact-box-basic.ts similarity index 89% rename from packages/g6/__tests__/demo/case/layout-compact-box-basic.ts rename to packages/g6/__tests__/demos/layout-compact-box-basic.ts index ea0fa670baf..14c6a4f327a 100644 --- a/packages/g6/__tests__/demo/case/layout-compact-box-basic.ts +++ b/packages/g6/__tests__/demos/layout-compact-box-basic.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutCompactBoxBasic: STDTestCase = async (context) => { +export const layoutCompactBoxBasic: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-compact-box-left-align.ts b/packages/g6/__tests__/demos/layout-compact-box-left-align.ts similarity index 90% rename from packages/g6/__tests__/demo/case/layout-compact-box-left-align.ts rename to packages/g6/__tests__/demos/layout-compact-box-left-align.ts index 80bfbef4a2b..c2fa174bc3c 100644 --- a/packages/g6/__tests__/demo/case/layout-compact-box-left-align.ts +++ b/packages/g6/__tests__/demos/layout-compact-box-left-align.ts @@ -1,9 +1,8 @@ import type { NodeData } from '@/src'; import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutCompactBoxTopToBottom: STDTestCase = async (context) => { +export const layoutCompactBoxTopToBottom: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-compact-box-top-to-bottom.ts b/packages/g6/__tests__/demos/layout-compact-box-top-to-bottom.ts similarity index 90% rename from packages/g6/__tests__/demo/case/layout-compact-box-top-to-bottom.ts rename to packages/g6/__tests__/demos/layout-compact-box-top-to-bottom.ts index fd387292c88..009a852f86d 100644 --- a/packages/g6/__tests__/demo/case/layout-compact-box-top-to-bottom.ts +++ b/packages/g6/__tests__/demos/layout-compact-box-top-to-bottom.ts @@ -1,9 +1,8 @@ import type { NodeData } from '@/src'; import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutCompactBoxLeftAlign: STDTestCase = async (context) => { +export const layoutCompactBoxLeftAlign: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-concentric.ts b/packages/g6/__tests__/demos/layout-concentric.ts similarity index 77% rename from packages/g6/__tests__/demo/case/layout-concentric.ts rename to packages/g6/__tests__/demos/layout-concentric.ts index 87381cf7b37..bd02a83cbca 100644 --- a/packages/g6/__tests__/demo/case/layout-concentric.ts +++ b/packages/g6/__tests__/demos/layout-concentric.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/gene.json'; -import type { STDTestCase } from '../types'; -export const layoutConcentric: STDTestCase = async (context) => { +export const layoutConcentric: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demos/layout-d3-force.ts b/packages/g6/__tests__/demos/layout-d3-force.ts new file mode 100644 index 00000000000..a31c5555bb1 --- /dev/null +++ b/packages/g6/__tests__/demos/layout-d3-force.ts @@ -0,0 +1,41 @@ +import { Graph } from '@/src'; +import data from '@@/dataset/force.json'; + +export const layoutD3Force: TestCase = async (context) => { + const graph = new Graph({ + ...context, + data, + padding: 20, + autoFit: 'view', + behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element', 'click-select'], + layout: { + type: 'd3force', + }, + node: { + style: { + labelText: (d) => d.id, + labelMaxWidth: '300%', + }, + palette: { + type: 'group', + field: 'cluster', + color: [ + '#1783FF', + '#00C9C9', + '#F08F56', + '#D580FF', + '#7863FF', + '#DB9D0D', + '#60C42D', + '#FF80CA', + '#2491B3', + '#17C76F', + ], + }, + }, + }); + + await graph.render(); + + return graph; +}; diff --git a/packages/g6/__tests__/demo/case/layout-dagre.ts b/packages/g6/__tests__/demos/layout-dagre.ts similarity index 92% rename from packages/g6/__tests__/demo/case/layout-dagre.ts rename to packages/g6/__tests__/demos/layout-dagre.ts index df74f08a4ae..6e62f863cb3 100644 --- a/packages/g6/__tests__/demo/case/layout-dagre.ts +++ b/packages/g6/__tests__/demos/layout-dagre.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const layoutDagre: STDTestCase = async (context) => { +export const layoutDagre: TestCase = async (context) => { const data = { nodes: [ { id: 'kspacey', data: { label: 'Kevin Spacey', width: 144, height: 100 } }, diff --git a/packages/g6/__tests__/demo/case/layout-dendrogram-basic.ts b/packages/g6/__tests__/demos/layout-dendrogram-basic.ts similarity index 86% rename from packages/g6/__tests__/demo/case/layout-dendrogram-basic.ts rename to packages/g6/__tests__/demos/layout-dendrogram-basic.ts index 5bb59956072..fa0a499e137 100644 --- a/packages/g6/__tests__/demo/case/layout-dendrogram-basic.ts +++ b/packages/g6/__tests__/demos/layout-dendrogram-basic.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutDendrogramBasic: STDTestCase = async (context) => { +export const layoutDendrogramBasic: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-dendrogram-tb.ts b/packages/g6/__tests__/demos/layout-dendrogram-tb.ts similarity index 89% rename from packages/g6/__tests__/demo/case/layout-dendrogram-tb.ts rename to packages/g6/__tests__/demos/layout-dendrogram-tb.ts index c8bdce5f9a1..cc38732fd5a 100644 --- a/packages/g6/__tests__/demo/case/layout-dendrogram-tb.ts +++ b/packages/g6/__tests__/demos/layout-dendrogram-tb.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutDendrogramTb: STDTestCase = async (context) => { +export const layoutDendrogramTb: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/layout-force.ts b/packages/g6/__tests__/demos/layout-force.ts similarity index 87% rename from packages/g6/__tests__/demo/case/layout-force.ts rename to packages/g6/__tests__/demos/layout-force.ts index 3af7983ac82..15d88437628 100644 --- a/packages/g6/__tests__/demo/case/layout-force.ts +++ b/packages/g6/__tests__/demos/layout-force.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/force.json'; -import type { STDTestCase } from '../types'; -export const layoutForce: STDTestCase = async (context) => { +export const layoutForce: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/static/controller-layout-forceatlas2-wasm.ts b/packages/g6/__tests__/demos/layout-forceatlas2-wasm.ts similarity index 70% rename from packages/g6/__tests__/demo/static/controller-layout-forceatlas2-wasm.ts rename to packages/g6/__tests__/demos/layout-forceatlas2-wasm.ts index 4c526d6a6ae..35ddfc59470 100644 --- a/packages/g6/__tests__/demo/static/controller-layout-forceatlas2-wasm.ts +++ b/packages/g6/__tests__/demos/layout-forceatlas2-wasm.ts @@ -1,12 +1,11 @@ import type { G6Spec } from '@/src'; import { Graph, register } from '@/src'; import data from '@@/dataset/soccer.json'; -import { ForceAtlas2Layout, initThreads, supportsThreads } from '@antv/layout-wasm'; -import type { STDTestCase } from '../types'; -register('layout', 'forceatlas2-wasm', ForceAtlas2Layout); +export const layoutForceatlas2WASM: TestCase = async (context) => { + const { ForceAtlas2Layout, initThreads, supportsThreads } = await import('@antv/layout-wasm'); + register('layout', 'forceatlas2-wasm', ForceAtlas2Layout); -export const controllerLayoutForceatlas2WASM: STDTestCase = async (context) => { const supported = await supportsThreads(); const threads = await initThreads(supported); diff --git a/packages/g6/__tests__/demo/case/layout-fruchterman-basic.ts b/packages/g6/__tests__/demos/layout-fruchterman-basic.ts similarity index 78% rename from packages/g6/__tests__/demo/case/layout-fruchterman-basic.ts rename to packages/g6/__tests__/demos/layout-fruchterman-basic.ts index 9122c65e981..091cc3d47f6 100644 --- a/packages/g6/__tests__/demo/case/layout-fruchterman-basic.ts +++ b/packages/g6/__tests__/demos/layout-fruchterman-basic.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const layoutFruchtermanBasic: STDTestCase = async (context) => { +export const layoutFruchtermanBasic: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-fruchterman-cluster.ts b/packages/g6/__tests__/demos/layout-fruchterman-cluster.ts similarity index 83% rename from packages/g6/__tests__/demo/case/layout-fruchterman-cluster.ts rename to packages/g6/__tests__/demos/layout-fruchterman-cluster.ts index 50c02d20d76..11d18976e51 100644 --- a/packages/g6/__tests__/demo/case/layout-fruchterman-cluster.ts +++ b/packages/g6/__tests__/demos/layout-fruchterman-cluster.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const layoutFruchtermanCluster: STDTestCase = async (context) => { +export const layoutFruchtermanCluster: TestCase = async (context) => { const graph = new Graph({ ...context, data: { ...data, nodes: data.nodes.map((n) => ({ ...n, cluster: n.data.cluster })) }, diff --git a/packages/g6/__tests__/demo/case/layout-fruchterman-fix.ts b/packages/g6/__tests__/demos/layout-fruchterman-fix.ts similarity index 82% rename from packages/g6/__tests__/demo/case/layout-fruchterman-fix.ts rename to packages/g6/__tests__/demos/layout-fruchterman-fix.ts index b30405dc771..e4a0048a79d 100644 --- a/packages/g6/__tests__/demo/case/layout-fruchterman-fix.ts +++ b/packages/g6/__tests__/demos/layout-fruchterman-fix.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/relations.json'; -import type { STDTestCase } from '../types'; -export const layoutFruchtermanFix: STDTestCase = async (context) => { +export const layoutFruchtermanFix: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/static/controller-layout-fruchterman-gpu.ts b/packages/g6/__tests__/demos/layout-fruchterman-gpu.ts similarity index 67% rename from packages/g6/__tests__/demo/static/controller-layout-fruchterman-gpu.ts rename to packages/g6/__tests__/demos/layout-fruchterman-gpu.ts index c560467bad2..6faa46761e3 100644 --- a/packages/g6/__tests__/demo/static/controller-layout-fruchterman-gpu.ts +++ b/packages/g6/__tests__/demos/layout-fruchterman-gpu.ts @@ -1,12 +1,10 @@ import type { G6Spec } from '@/src'; import { Graph, register } from '@/src'; import data from '@@/dataset/soccer.json'; -import { FruchtermanLayout } from '@antv/layout-gpu'; -import type { STDTestCase } from '../types'; -register('layout', 'fruchterman-gpu', FruchtermanLayout); +export const layoutFruchtermanGPU: TestCase = async (context) => { + register('layout', 'fruchterman-gpu', (await import('@antv/layout-gpu')).FruchtermanLayout); -export const controllerLayoutFruchtermanGPU: STDTestCase = async (context) => { const options: G6Spec = { ...context, data, diff --git a/packages/g6/__tests__/demo/static/controller-layout-fruchterman-wasm.ts b/packages/g6/__tests__/demos/layout-fruchterman-wasm.ts similarity index 69% rename from packages/g6/__tests__/demo/static/controller-layout-fruchterman-wasm.ts rename to packages/g6/__tests__/demos/layout-fruchterman-wasm.ts index dcd1e8e9803..73a24b97b73 100644 --- a/packages/g6/__tests__/demo/static/controller-layout-fruchterman-wasm.ts +++ b/packages/g6/__tests__/demos/layout-fruchterman-wasm.ts @@ -1,12 +1,12 @@ import type { G6Spec } from '@/src'; import { Graph, register } from '@/src'; import data from '@@/dataset/soccer.json'; -import { FruchtermanLayout, initThreads, supportsThreads } from '@antv/layout-wasm'; -import type { STDTestCase } from '../types'; -register('layout', 'fruchterman-wasm', FruchtermanLayout); +export const layoutFruchtermanWASM: TestCase = async (context) => { + const { FruchtermanLayout, initThreads, supportsThreads } = await import('@antv/layout-wasm'); + + register('layout', 'fruchterman-wasm', FruchtermanLayout); -export const controllerLayoutFruchtermanWASM: STDTestCase = async (context) => { const supported = await supportsThreads(); const threads = await initThreads(supported); diff --git a/packages/g6/__tests__/demo/case/layout-grid.ts b/packages/g6/__tests__/demos/layout-grid.ts similarity index 89% rename from packages/g6/__tests__/demo/case/layout-grid.ts rename to packages/g6/__tests__/demos/layout-grid.ts index 2ee0159de48..9eecde38bc1 100644 --- a/packages/g6/__tests__/demo/case/layout-grid.ts +++ b/packages/g6/__tests__/demos/layout-grid.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const layoutGrid: STDTestCase = async (context) => { +export const layoutGrid: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/static/controller-layout-indented.ts b/packages/g6/__tests__/demos/layout-indented.ts similarity index 85% rename from packages/g6/__tests__/demo/static/controller-layout-indented.ts rename to packages/g6/__tests__/demos/layout-indented.ts index 1b15c602239..f9c778d1831 100644 --- a/packages/g6/__tests__/demo/static/controller-layout-indented.ts +++ b/packages/g6/__tests__/demos/layout-indented.ts @@ -1,9 +1,8 @@ import type { G6Spec } from '@/src'; import { Graph, Utils } from '@/src'; import tree from '@@/dataset/file-system.json'; -import type { STDTestCase } from '../types'; -export const controllerLayoutIndented: STDTestCase = async (context) => { +export const layoutIndented: TestCase = async (context) => { const options: G6Spec = { ...context, y: -200, diff --git a/packages/g6/__tests__/demo/case/layout-mds.ts b/packages/g6/__tests__/demos/layout-mds.ts similarity index 87% rename from packages/g6/__tests__/demo/case/layout-mds.ts rename to packages/g6/__tests__/demos/layout-mds.ts index 1f0b7c3bca1..51ac6ff6d37 100644 --- a/packages/g6/__tests__/demo/case/layout-mds.ts +++ b/packages/g6/__tests__/demos/layout-mds.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const layoutMDS: STDTestCase = async (context) => { +export const layoutMDS: TestCase = async (context) => { const graph = new Graph({ ...context, padding: 20, diff --git a/packages/g6/__tests__/demo/case/layout-mindmap-h-custom-side.ts b/packages/g6/__tests__/demos/layout-mindmap-h-custom-side.ts similarity index 91% rename from packages/g6/__tests__/demo/case/layout-mindmap-h-custom-side.ts rename to packages/g6/__tests__/demos/layout-mindmap-h-custom-side.ts index 6ad43b05fcf..07befb58304 100644 --- a/packages/g6/__tests__/demo/case/layout-mindmap-h-custom-side.ts +++ b/packages/g6/__tests__/demos/layout-mindmap-h-custom-side.ts @@ -1,9 +1,8 @@ import type { NodeData } from '@/src'; import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutMindmapHCustomSide: STDTestCase = async (context) => { +export const layoutMindmapHCustomSide: TestCase = async (context) => { const graph = new Graph({ ...context, data: Utils.treeToGraphData(data), diff --git a/packages/g6/__tests__/demo/case/layout-mindmap-h-left.ts b/packages/g6/__tests__/demos/layout-mindmap-h-left.ts similarity index 90% rename from packages/g6/__tests__/demo/case/layout-mindmap-h-left.ts rename to packages/g6/__tests__/demos/layout-mindmap-h-left.ts index 72e0a38f8f0..13996ec3a93 100644 --- a/packages/g6/__tests__/demo/case/layout-mindmap-h-left.ts +++ b/packages/g6/__tests__/demos/layout-mindmap-h-left.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutMindmapHLeft: STDTestCase = async (context) => { +export const layoutMindmapHLeft: TestCase = async (context) => { const graph = new Graph({ ...context, data: Utils.treeToGraphData(data), diff --git a/packages/g6/__tests__/demo/case/layout-mindmap-h-right.ts b/packages/g6/__tests__/demos/layout-mindmap-h-right.ts similarity index 90% rename from packages/g6/__tests__/demo/case/layout-mindmap-h-right.ts rename to packages/g6/__tests__/demos/layout-mindmap-h-right.ts index 5aecd75c05a..ec6ae2c1293 100644 --- a/packages/g6/__tests__/demo/case/layout-mindmap-h-right.ts +++ b/packages/g6/__tests__/demos/layout-mindmap-h-right.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutMindmapHRight: STDTestCase = async (context) => { +export const layoutMindmapHRight: TestCase = async (context) => { const graph = new Graph({ ...context, data: Utils.treeToGraphData(data), diff --git a/packages/g6/__tests__/demo/case/layout-mindmap-h.ts b/packages/g6/__tests__/demos/layout-mindmap-h.ts similarity index 91% rename from packages/g6/__tests__/demo/case/layout-mindmap-h.ts rename to packages/g6/__tests__/demos/layout-mindmap-h.ts index 4fedf1409b9..730eff10807 100644 --- a/packages/g6/__tests__/demo/case/layout-mindmap-h.ts +++ b/packages/g6/__tests__/demos/layout-mindmap-h.ts @@ -1,8 +1,7 @@ import { Graph, Utils } from '@/src'; import data from '@@/dataset/algorithm-category.json'; -import type { STDTestCase } from '../types'; -export const layoutMindmapH: STDTestCase = async (context) => { +export const layoutMindmapH: TestCase = async (context) => { const graph = new Graph({ ...context, data: Utils.treeToGraphData(data), diff --git a/packages/g6/__tests__/demo/case/layout-radial-basic.ts b/packages/g6/__tests__/demos/layout-radial-basic.ts similarity index 78% rename from packages/g6/__tests__/demo/case/layout-radial-basic.ts rename to packages/g6/__tests__/demos/layout-radial-basic.ts index 64e1df3c288..bd60858da37 100644 --- a/packages/g6/__tests__/demo/case/layout-radial-basic.ts +++ b/packages/g6/__tests__/demos/layout-radial-basic.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; -export const layoutRadialBasic: STDTestCase = async (context) => { +export const layoutRadialBasic: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-radial-configuration-translate.ts b/packages/g6/__tests__/demos/layout-radial-configuration-translate.ts similarity index 79% rename from packages/g6/__tests__/demo/case/layout-radial-configuration-translate.ts rename to packages/g6/__tests__/demos/layout-radial-configuration-translate.ts index 1695896f393..af679e9576d 100644 --- a/packages/g6/__tests__/demo/case/layout-radial-configuration-translate.ts +++ b/packages/g6/__tests__/demos/layout-radial-configuration-translate.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; -export const layoutRadialConfigurationTranslate: STDTestCase = async (context) => { +export const layoutRadialConfigurationTranslate: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-radial-prevent-overlap-unstrict.ts b/packages/g6/__tests__/demos/layout-radial-prevent-overlap-unstrict.ts similarity index 81% rename from packages/g6/__tests__/demo/case/layout-radial-prevent-overlap-unstrict.ts rename to packages/g6/__tests__/demos/layout-radial-prevent-overlap-unstrict.ts index c67404aa7ca..963c0fbb96d 100644 --- a/packages/g6/__tests__/demo/case/layout-radial-prevent-overlap-unstrict.ts +++ b/packages/g6/__tests__/demos/layout-radial-prevent-overlap-unstrict.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; -export const layoutRadialPreventOverlapUnstrict: STDTestCase = async (context) => { +export const layoutRadialPreventOverlapUnstrict: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-radial-prevent-overlap.ts b/packages/g6/__tests__/demos/layout-radial-prevent-overlap.ts similarity index 82% rename from packages/g6/__tests__/demo/case/layout-radial-prevent-overlap.ts rename to packages/g6/__tests__/demos/layout-radial-prevent-overlap.ts index 0d6a4494b83..02742e602dd 100644 --- a/packages/g6/__tests__/demo/case/layout-radial-prevent-overlap.ts +++ b/packages/g6/__tests__/demos/layout-radial-prevent-overlap.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; -export const layoutRadialPreventOverlap: STDTestCase = async (context) => { +export const layoutRadialPreventOverlap: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/layout-radial-sort.ts b/packages/g6/__tests__/demos/layout-radial-sort.ts similarity index 85% rename from packages/g6/__tests__/demo/case/layout-radial-sort.ts rename to packages/g6/__tests__/demos/layout-radial-sort.ts index bd74b91363d..30c39e88377 100644 --- a/packages/g6/__tests__/demo/case/layout-radial-sort.ts +++ b/packages/g6/__tests__/demos/layout-radial-sort.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/radial.json'; -import type { STDTestCase } from '../types'; -export const layoutRadialSort: STDTestCase = async (context) => { +export const layoutRadialSort: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/plugin-contextmenu.ts b/packages/g6/__tests__/demos/plugin-contextmenu.ts similarity index 92% rename from packages/g6/__tests__/demo/case/plugin-contextmenu.ts rename to packages/g6/__tests__/demos/plugin-contextmenu.ts index 2b284024e74..cbf57734dad 100644 --- a/packages/g6/__tests__/demo/case/plugin-contextmenu.ts +++ b/packages/g6/__tests__/demos/plugin-contextmenu.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const pluginContextmenu: STDTestCase = async (context) => { +export const pluginContextmenu: TestCase = async (context) => { const graph = new Graph({ ...context, autoResize: true, diff --git a/packages/g6/__tests__/demo/case/plugin-grid-line.ts b/packages/g6/__tests__/demos/plugin-grid-line.ts similarity index 93% rename from packages/g6/__tests__/demo/case/plugin-grid-line.ts rename to packages/g6/__tests__/demos/plugin-grid-line.ts index 0b88d8713bd..accb4331117 100644 --- a/packages/g6/__tests__/demo/case/plugin-grid-line.ts +++ b/packages/g6/__tests__/demos/plugin-grid-line.ts @@ -1,9 +1,8 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; import { isObject } from '@antv/util'; -import type { STDTestCase } from '../types'; -export const pluginGridLine: STDTestCase = async (context) => { +export const pluginGridLine: TestCase = async (context) => { const graph = new Graph({ ...context, autoResize: true, diff --git a/packages/g6/__tests__/demo/case/plugin-toolbar-build-in.ts b/packages/g6/__tests__/demos/plugin-toolbar-build-in.ts similarity index 94% rename from packages/g6/__tests__/demo/case/plugin-toolbar-build-in.ts rename to packages/g6/__tests__/demos/plugin-toolbar-build-in.ts index 08055301071..81c749fc0bf 100644 --- a/packages/g6/__tests__/demo/case/plugin-toolbar-build-in.ts +++ b/packages/g6/__tests__/demos/plugin-toolbar-build-in.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const pluginToolbarBuildIn: STDTestCase = async (context) => { +export const pluginToolbarBuildIn: TestCase = async (context) => { const graph = new Graph({ ...context, autoResize: true, diff --git a/packages/g6/__tests__/demo/case/plugin-toolbar-iconfont.ts b/packages/g6/__tests__/demos/plugin-toolbar-iconfont.ts similarity index 88% rename from packages/g6/__tests__/demo/case/plugin-toolbar-iconfont.ts rename to packages/g6/__tests__/demos/plugin-toolbar-iconfont.ts index f523a07778a..9d8468f4cc6 100644 --- a/packages/g6/__tests__/demo/case/plugin-toolbar-iconfont.ts +++ b/packages/g6/__tests__/demos/plugin-toolbar-iconfont.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const pluginToolbarIconfont: STDTestCase = async (context) => { +export const pluginToolbarIconfont: TestCase = async (context) => { // Use iconfont for toolbar items. const iconFont = document.createElement('script'); iconFont.src = '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js'; diff --git a/packages/g6/__tests__/demo/case/plugin-tooltip.ts b/packages/g6/__tests__/demos/plugin-tooltip.ts similarity index 91% rename from packages/g6/__tests__/demo/case/plugin-tooltip.ts rename to packages/g6/__tests__/demos/plugin-tooltip.ts index b468c4a794f..e31d91b6b2d 100644 --- a/packages/g6/__tests__/demo/case/plugin-tooltip.ts +++ b/packages/g6/__tests__/demos/plugin-tooltip.ts @@ -1,9 +1,8 @@ import { Graph } from '@/src'; import data from '@@/dataset/combo.json'; import { isObject } from '@antv/util'; -import type { STDTestCase } from '../types'; -export const pluginTooltip: STDTestCase = async (context) => { +export const pluginTooltip: TestCase = async (context) => { const graph = new Graph({ ...context, data, diff --git a/packages/g6/__tests__/demo/case/plugin-watermark-image.ts b/packages/g6/__tests__/demos/plugin-watermark-image.ts similarity index 89% rename from packages/g6/__tests__/demo/case/plugin-watermark-image.ts rename to packages/g6/__tests__/demos/plugin-watermark-image.ts index 5a952d65854..eb4f35f1afa 100644 --- a/packages/g6/__tests__/demo/case/plugin-watermark-image.ts +++ b/packages/g6/__tests__/demos/plugin-watermark-image.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import type { STDTestCase } from '../types'; -export const pluginWatermarkImage: STDTestCase = async (context) => { +export const pluginWatermarkImage: TestCase = async (context) => { const graph = new Graph({ ...context, autoResize: true, diff --git a/packages/g6/__tests__/demo/case/plugin-watermark.ts b/packages/g6/__tests__/demos/plugin-watermark.ts similarity index 92% rename from packages/g6/__tests__/demo/case/plugin-watermark.ts rename to packages/g6/__tests__/demos/plugin-watermark.ts index 192b487ae59..268228ad1cd 100644 --- a/packages/g6/__tests__/demo/case/plugin-watermark.ts +++ b/packages/g6/__tests__/demos/plugin-watermark.ts @@ -1,9 +1,8 @@ import { Graph, PluginOptions } from '@/src'; import data from '@@/dataset/cluster.json'; import { isObject } from '@antv/util'; -import type { STDTestCase } from '../types'; -export const pluginWatermark: STDTestCase = async (context) => { +export const pluginWatermark: TestCase = async (context) => { const graph = new Graph({ ...context, autoResize: true, diff --git a/packages/g6/__tests__/demo/case/theme.ts b/packages/g6/__tests__/demos/theme.ts similarity index 91% rename from packages/g6/__tests__/demo/case/theme.ts rename to packages/g6/__tests__/demos/theme.ts index c7592fa5688..2c7180453bc 100644 --- a/packages/g6/__tests__/demo/case/theme.ts +++ b/packages/g6/__tests__/demos/theme.ts @@ -1,8 +1,7 @@ import { Graph } from '@/src'; -import data from '../../dataset/cluster.json'; -import type { STDTestCase } from '../types'; +import data from '../dataset/cluster.json'; -export const theme: STDTestCase = async (context) => { +export const theme: TestCase = async (context) => { const graph = new Graph({ ...context, autoFit: 'view', diff --git a/packages/g6/__tests__/demo/case/viewport-fit.ts b/packages/g6/__tests__/demos/viewport-fit.ts similarity index 92% rename from packages/g6/__tests__/demo/case/viewport-fit.ts rename to packages/g6/__tests__/demos/viewport-fit.ts index f77e28de145..4e79f6d1ecf 100644 --- a/packages/g6/__tests__/demo/case/viewport-fit.ts +++ b/packages/g6/__tests__/demos/viewport-fit.ts @@ -1,7 +1,6 @@ import { Graph } from '@/src'; -import type { STDTestCase } from '../types'; -export const viewportFit: STDTestCase = async (context) => { +export const viewportFit: TestCase = async (context) => { const graph = new Graph({ ...context, data: { diff --git a/packages/g6/__tests__/integration/animation.spec.ts b/packages/g6/__tests__/integration/animation.spec.ts deleted file mode 100644 index b2560f3b170..00000000000 --- a/packages/g6/__tests__/integration/animation.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { createGraphCanvas, getCases, sleep } from '@@/utils'; -import * as animationCases from '../demo/animation'; - -describe('static', () => { - const cases = getCases(animationCases); - - for (const [name, testCase] of cases) { - it(`[animation]: ${name}`, async () => { - const canvas = createGraphCanvas(); - - try { - const { times = [] } = testCase; - - await canvas.init(); - const animationResult = await testCase({ container: canvas, animation: true, theme: 'light' }); - - if (!animationResult) throw new Error('animation result should not be null'); - - animationResult.pause(); - - for (const time of times) { - animationResult.currentTime = time; - await sleep(32); - await expect(canvas).toMatchSVGSnapshot( - `${__dirname}/snapshots/animation`, - // 命名示例:label-1000(1_3) - // naming example: label-1000(1_3) - `${name}-${time}(${times.indexOf(time) + 1}_${times.length})`, - ); - } - } finally { - canvas.destroy(); - await sleep(50); - } - }); - } -}); diff --git a/packages/g6/__tests__/integration/default.spec.ts b/packages/g6/__tests__/integration/default.spec.ts deleted file mode 100644 index ce13dc4d36b..00000000000 --- a/packages/g6/__tests__/integration/default.spec.ts +++ /dev/null @@ -1,5 +0,0 @@ -describe('default', () => { - it('expect', () => { - expect(1).toBe(1); - }); -}); diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-0(1_3).svg deleted file mode 100644 index 812de27ed1a..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-0(1_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-1000(3_3).svg deleted file mode 100644 index cbae3c2ff7e..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-1000(3_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-500(2_3).svg deleted file mode 100644 index 2c03d09215e..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-breathe-500(2_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-0(1_3).svg deleted file mode 100644 index 7b4db0fce25..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-0(1_3).svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-1000(3_3).svg deleted file mode 100644 index e8e73a857df..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-1000(3_3).svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-500(2_3).svg deleted file mode 100644 index 6d29b8b42d7..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-fade-in-500(2_3).svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-translate-0(1_3).svg deleted file mode 100644 index febc2bcd705..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-0(1_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-translate-1000(3_3).svg deleted file mode 100644 index f49db63c318..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-1000(3_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-translate-500(2_3).svg deleted file mode 100644 index c77b7995d30..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-translate-500(2_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-0(1_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-0(1_6).svg deleted file mode 100644 index 460ad129e20..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-0(1_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1000(3_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1000(3_6).svg deleted file mode 100644 index 70d1e9e2c86..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1000(3_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1500(4_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1500(4_6).svg deleted file mode 100644 index 8bcf28b6d67..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-1500(4_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-2000(5_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-2000(5_6).svg deleted file mode 100644 index d785fdb0ebe..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-2000(5_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-3000(6_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-3000(6_6).svg deleted file mode 100644 index 2d2c7651403..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-3000(6_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-500(2_6).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-wave-500(2_6).svg deleted file mode 100644 index 732050d7888..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-wave-500(2_6).svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-0(1_3).svg deleted file mode 100644 index 4e54b343606..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-0(1_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-1000(3_3).svg deleted file mode 100644 index cbae3c2ff7e..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-1000(3_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-500(2_3).svg deleted file mode 100644 index 48c9fd26442..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/animation-zoom-in-500(2_3).svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-1000(3_3).svg deleted file mode 100644 index f681be5573c..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-1000(3_3).svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-200(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-200(2_3).svg deleted file mode 100644 index 8f06d081014..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-200(2_3).svg +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-50(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-50(1_3).svg deleted file mode 100644 index 87986874027..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-50(1_3).svg +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-0(1_3).svg deleted file mode 100644 index c091c4db8c7..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-0(1_3).svg +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-1000(3_3).svg deleted file mode 100644 index bb12fa72e69..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-1000(3_3).svg +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-200(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-200(2_3).svg deleted file mode 100644 index 6a1b5f320c7..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-position-200(2_3).svg +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-0(1_2).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-0(1_2).svg deleted file mode 100644 index 27064eaf250..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-0(1_2).svg +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-1000(2_2).svg b/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-1000(2_2).svg deleted file mode 100644 index 46563049e3b..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/controller-element-state-1000(2_2).svg +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-0(1_3).svg deleted file mode 100644 index a9612bda20f..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-0(1_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - cubic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-1000(3_3).svg deleted file mode 100644 index cea639add42..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-1000(3_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - cubic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-500(2_3).svg deleted file mode 100644 index 2bc61335d52..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-cubic-500(2_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - cubic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-line-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-line-0(1_3).svg deleted file mode 100644 index 984cbbbea05..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-line-0(1_3).svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - line-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-line-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-line-1000(3_3).svg deleted file mode 100644 index 9d8d417927f..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-line-1000(3_3).svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - line-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-line-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-line-500(2_3).svg deleted file mode 100644 index 5387f382db2..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-line-500(2_3).svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - line-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-0(1_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-0(1_3).svg deleted file mode 100644 index 0728f92a1cb..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-0(1_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - quadratic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-1000(3_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-1000(3_3).svg deleted file mode 100644 index f47f9cd0747..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-1000(3_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - quadratic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-500(2_3).svg b/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-500(2_3).svg deleted file mode 100644 index 592290cb0f1..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/edge-quadratic-500(2_3).svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - quadratic-edge - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/shape-label-0(1_2).svg b/packages/g6/__tests__/integration/snapshots/animation/shape-label-0(1_2).svg deleted file mode 100644 index 3c38296453a..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/shape-label-0(1_2).svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - label text - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/animation/shape-label-1000(2_2).svg b/packages/g6/__tests__/integration/snapshots/animation/shape-label-1000(2_2).svg deleted file mode 100644 index cf8c9fd674b..00000000000 --- a/packages/g6/__tests__/integration/snapshots/animation/shape-label-1000(2_2).svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - label text - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-element-position.svg b/packages/g6/__tests__/integration/snapshots/static/controller-element-position.svg deleted file mode 100644 index bb12fa72e69..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-element-position.svg +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-element-visibility.svg b/packages/g6/__tests__/integration/snapshots/static/controller-element-visibility.svg deleted file mode 100644 index daf3eaaee1d..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-element-visibility.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-element-z-index.svg b/packages/g6/__tests__/integration/snapshots/static/controller-element-z-index.svg deleted file mode 100644 index 9bcca3195e5..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-element-z-index.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-element.svg b/packages/g6/__tests__/integration/snapshots/static/controller-element.svg deleted file mode 100644 index f36c7ad920b..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-element.svg +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-ant-v-dagre.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-ant-v-dagre.svg deleted file mode 100644 index d3b29df76c9..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-ant-v-dagre.svg +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-circular.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-circular.svg deleted file mode 100644 index e518298664c..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-circular.svg +++ /dev/null @@ -1,2563 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-compact-box.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-compact-box.svg deleted file mode 100644 index 12cdc50c96f..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-compact-box.svg +++ /dev/null @@ -1,1896 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-d3-force.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-d3-force.svg deleted file mode 100644 index 6780b360f71..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-d3-force.svg +++ /dev/null @@ -1,2579 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-dendrogram.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-dendrogram.svg deleted file mode 100644 index 2a16f73e97e..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-dendrogram.svg +++ /dev/null @@ -1,1896 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-grid.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-grid.svg deleted file mode 100644 index 2d7bea35b4f..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-grid.svg +++ /dev/null @@ -1,2515 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-indented.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-indented.svg deleted file mode 100644 index 038b9b08beb..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-indented.svg +++ /dev/null @@ -1,826 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-mindmap.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-mindmap.svg deleted file mode 100644 index bba1497f0c4..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-mindmap.svg +++ /dev/null @@ -1,1443 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-layout-radial.svg b/packages/g6/__tests__/integration/snapshots/static/controller-layout-radial.svg deleted file mode 100644 index 943102be323..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-layout-radial.svg +++ /dev/null @@ -1,2367 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/controller-viewport.svg b/packages/g6/__tests__/integration/snapshots/static/controller-viewport.svg deleted file mode 100644 index ab61b939fe8..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/controller-viewport.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-arrow.svg b/packages/g6/__tests__/integration/snapshots/static/edge-arrow.svg deleted file mode 100644 index 728dcd5a3d7..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-arrow.svg +++ /dev/null @@ -1,867 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - default-arrow - - - - - - - - - - - - - - - - - - - - - triangle-arrow - - - - - - - - - - - - - - - - - - - - - simple-arrow - - - - - - - - - - - - - - - - - - - - - vee-arrow - - - - - - - - - - - - - - - - - - - - - circle-arrow - - - - - - - - - - - - - - - - - - - - - rect-arrow - - - - - - - - - - - - - - - - - - - - - diamond-arrow - - - - - - - - - - - - - - - - - - - - - triangleRect-arrow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-cubic-horizontal.svg b/packages/g6/__tests__/integration/snapshots/static/edge-cubic-horizontal.svg deleted file mode 100644 index bcd88b6d2fe..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-cubic-horizontal.svg +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - line-default - - - - - - - - - - - - - - - - - - - - - - - - - line-active - - - - - - - - - - - - - - - - - - - - - - - - - line-selected - - - - - - - - - - - - - - - - - - - - - line-highlight - - - - - - - - - - - - - - - - - - - - - line-inactive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-cubic-vertical.svg b/packages/g6/__tests__/integration/snapshots/static/edge-cubic-vertical.svg deleted file mode 100644 index b1f7ca98168..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-cubic-vertical.svg +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - line-default - - - - - - - - - - - - - - - - - - - - - - - - - line-active - - - - - - - - - - - - - - - - - - - - - - - - - line-selected - - - - - - - - - - - - - - - - - - - - - line-highlight - - - - - - - - - - - - - - - - - - - - - line-inactive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-cubic.svg b/packages/g6/__tests__/integration/snapshots/static/edge-cubic.svg deleted file mode 100644 index 2d5544c1848..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-cubic.svg +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - line-default - - - - - - - - - - - - - - - - - - - - - - - - - line-active - - - - - - - - - - - - - - - - - - - - - - - - - line-selected - - - - - - - - - - - - - - - - - - - - - line-highlight - - - - - - - - - - - - - - - - - - - - - line-inactive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-custom-arrow.svg b/packages/g6/__tests__/integration/snapshots/static/edge-custom-arrow.svg deleted file mode 100644 index 2881978f03a..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-custom-arrow.svg +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - custom-arrow-1 - - - - - - - - - - - - - - - - - - - - - custom-arrow-2 - - - - - - - - - - - - - - - - - - - - - image-arrow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-line.svg b/packages/g6/__tests__/integration/snapshots/static/edge-line.svg deleted file mode 100644 index 21d11c41d87..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-line.svg +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - line-default - - - - - - - - - - - - - - - - - - - - - - - - - line-active - - - - - - - - - - - - - - - - - - - - - - - - - line-selected - - - - - - - - - - - - - - - - - - - - - line-highlight - - - - - - - - - - - - - - - - - - - - - line-inactive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-loop-curve.svg b/packages/g6/__tests__/integration/snapshots/static/edge-loop-curve.svg deleted file mode 100644 index 556f8041ac8..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-loop-curve.svg +++ /dev/null @@ -1,679 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-loop-polyline.svg b/packages/g6/__tests__/integration/snapshots/static/edge-loop-polyline.svg deleted file mode 100644 index 1e3a064c739..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-loop-polyline.svg +++ /dev/null @@ -1,679 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-polyline.svg b/packages/g6/__tests__/integration/snapshots/static/edge-polyline.svg deleted file mode 100644 index 241f9a0d61e..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-polyline.svg +++ /dev/null @@ -1,741 +0,0 @@ - - - - - - - - - - - - - - - Loop - - - - - - - - - - - - - - - - - - - - - - - - - Loop - - - - - - - - - - - - - - - - - - - - - - - - - - Loop - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - 4 - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - - - 7 - - - - - - - - - - - - - - - - - - 8 - - - - - - - - - - - - - - - - - - - - 9 - - - - - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-port.svg b/packages/g6/__tests__/integration/snapshots/static/edge-port.svg deleted file mode 100644 index 5479a7426f1..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-port.svg +++ /dev/null @@ -1,1222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort❓ - - - targetPort❓ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✅ - - - targetPort✅ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✖️ - - - targetPort✖️ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✖️ - - - targetPort✅ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✅ - - - targetPort✖️ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort❓ - - - targetPort✖️ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort❓ - - - targetPort✅ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✖️ - - - targetPort❓ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✅ - - - targetPort❓ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sourcePort✅ - - - targetPort❓ - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/edge-quadratic.svg b/packages/g6/__tests__/integration/snapshots/static/edge-quadratic.svg deleted file mode 100644 index aa3042fda84..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/edge-quadratic.svg +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - line-default - - - - - - - - - - - - - - - - - - - - - - - - - line-active - - - - - - - - - - - - - - - - - - - - - - - - - line-selected - - - - - - - - - - - - - - - - - - - - - line-highlight - - - - - - - - - - - - - - - - - - - - - line-inactive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/element-label-background.svg b/packages/g6/__tests__/integration/snapshots/static/element-label-background.svg deleted file mode 100644 index d024036a62d..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/element-label-background.svg +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - - - - - - - - edge1 - - - - - - - - - - - - - - edge2 - - - - - - - - - - - - - - edge3 - - - - - - - - - - - - - - - - - node1 - - - - - - - - - - - - - - - node2 - - - - - - - - - - - - - - - node3 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/element-label-oversized.svg b/packages/g6/__tests__/integration/snapshots/static/element-label-oversized.svg deleted file mode 100644 index 43b5b27ba56..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/element-label-oversized.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - This label is too long to - - - be displayed - - - - - - - - - - - - - - - - - - - This label is - - - too long to be - - - displayed - - - - - - - - - - - - - - - - - This label is too long to - - - be displayed - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/graph-element.svg b/packages/g6/__tests__/integration/snapshots/static/graph-element.svg deleted file mode 100644 index ef703b3370a..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/graph-element.svg +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/layered-canvas.svg b/packages/g6/__tests__/integration/snapshots/static/layered-canvas.svg deleted file mode 100644 index a1830dd0820..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/layered-canvas.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-circle.svg b/packages/g6/__tests__/integration/snapshots/static/node-circle.svg deleted file mode 100644 index 577fd85d605..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-circle.svg +++ /dev/null @@ -1,691 +0,0 @@ - - - - - - - - - - - - - - - circle - - - - - - - - - - - - - - - - - - - - circle-halo - - - - - - - - - - - - - - - - - circle-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - circle-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - circle-active - - - - - - - - - - - - - - - - - - - - circle-selected - - - - - - - - - - - - - - - - - circle-highlight - - - - - - - - - - - - - - - - - circle-inactive - - - - - - - - - - - - - - - - - circle-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-diamond.svg b/packages/g6/__tests__/integration/snapshots/static/node-diamond.svg deleted file mode 100644 index 3aac9823644..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-diamond.svg +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - - - - - - - - - - diamond - - - - - - - - - - - - - - - - - - - - diamond-halo - - - - - - - - - - - - - - - - - diamond-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - diamond-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diamond-active - - - - - - - - - - - - - - - - - - - - diamond-selected - - - - - - - - - - - - - - - - - diamond-highlight - - - - - - - - - - - - - - - - - diamond-inactive - - - - - - - - - - - - - - - - - diamond-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-ellipse.svg b/packages/g6/__tests__/integration/snapshots/static/node-ellipse.svg deleted file mode 100644 index cae21f7a07b..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-ellipse.svg +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - - - - - - - - ellipse - - - - - - - - - - - - - - - - - - - - ellipse-halo - - - - - - - - - - - - - - - - - ellipse-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - ellipse-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ellipse-active - - - - - - - - - - - - - - - - - - - - ellipse-selected - - - - - - - - - - - - - - - - - ellipse-highlight - - - - - - - - - - - - - - - - - ellipse-inactive - - - - - - - - - - - - - - - - - ellipse-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-hexagon.svg b/packages/g6/__tests__/integration/snapshots/static/node-hexagon.svg deleted file mode 100644 index 729930fdbbc..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-hexagon.svg +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - - - - - - - - - - hexagon - - - - - - - - - - - - - - - - - - - - hexagon-halo - - - - - - - - - - - - - - - - - hexagon-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - hexagon-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hexagon-active - - - - - - - - - - - - - - - - - - - - hexagon-selected - - - - - - - - - - - - - - - - - hexagon-highlight - - - - - - - - - - - - - - - - - hexagon-inactive - - - - - - - - - - - - - - - - - hexagon-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-image.svg b/packages/g6/__tests__/integration/snapshots/static/node-image.svg deleted file mode 100644 index 439cb881d6a..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-image.svg +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - - - - - - - - image - - - - - - - - - - - - - - - image-halo - - - - - - - - - - - - image-badges - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - image-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - image-active - - - - - - - - - - - - - - - image-selected - - - - - - - - - - - - image-highlight - - - - - - - - - - - - image-inactive - - - - - - - - - - - - image-disabled - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-rect.svg b/packages/g6/__tests__/integration/snapshots/static/node-rect.svg deleted file mode 100644 index 97518912b95..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-rect.svg +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - - - - - - - - - - rect - - - - - - - - - - - - - - - - - - - - rect-halo - - - - - - - - - - - - - - - - - rect-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - rect-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rect-active - - - - - - - - - - - - - - - - - - - - rect-selected - - - - - - - - - - - - - - - - - rect-highlight - - - - - - - - - - - - - - - - - rect-inactive - - - - - - - - - - - - - - - - - rect-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-star.svg b/packages/g6/__tests__/integration/snapshots/static/node-star.svg deleted file mode 100644 index e7166bdb05d..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-star.svg +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - - - - - - - - - - star - - - - - - - - - - - - - - - - - - - - star-halo - - - - - - - - - - - - - - - - - star-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - star-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - star-active - - - - - - - - - - - - - - - - - - - - star-selected - - - - - - - - - - - - - - - - - star-highlight - - - - - - - - - - - - - - - - - star-inactive - - - - - - - - - - - - - - - - - star-disabled - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/node-triangle.svg b/packages/g6/__tests__/integration/snapshots/static/node-triangle.svg deleted file mode 100644 index 705566d56e6..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/node-triangle.svg +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - triangle - - - - - - - - - - - - - - - - - - - - triangle-halo - - - - - - - - - - - - - - - - - triangle-badges - - - - - - - - - - - - - - - - A - - - - - - - - - - - - Important - - - - - - - - - - - - Notice - - - - - - - - - - - - - triangle-ports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - triangle-active - - - - - - - - - - - - - - - - - - - - triangle-selected - - - - - - - - - - - - - - - - - triangle-highlight - - - - - - - - - - - - - - - - - triangle-inactive - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/shape-badge.svg b/packages/g6/__tests__/integration/snapshots/static/shape-badge.svg deleted file mode 100644 index 0ec938ad22d..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/shape-badge.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - Important - - - - - - - - - - - - A - - - - - - - - - - - - Notice - - - - - - - - - - - - Update Badge Text - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/shape-icon.svg b/packages/g6/__tests__/integration/snapshots/static/shape-icon.svg deleted file mode 100644 index 2fbccc54d81..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/shape-icon.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - text icon - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/snapshots/static/shape-label.svg b/packages/g6/__tests__/integration/snapshots/static/shape-label.svg deleted file mode 100644 index d6fc2d8dec1..00000000000 --- a/packages/g6/__tests__/integration/snapshots/static/shape-label.svg +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - label1 text - - - - - - - - - - label2 text - - - - - - - - - - label3... - - - - - - - - - - - Long Text Long Text Long Text Long Text - - - Long Text Long Text Long Text Long Tex... - - - - - - - - - - - label1 text - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/integration/static.spec.ts b/packages/g6/__tests__/integration/static.spec.ts deleted file mode 100644 index bbe0d609a57..00000000000 --- a/packages/g6/__tests__/integration/static.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { createGraphCanvas, getCases, sleep } from '@@/utils'; -import * as staticCases from '../demo/static/common'; - -describe('static', () => { - const cases = getCases(staticCases); - - for (const [name, testCase] of cases) { - it(`[static]: ${name}`, async () => { - const canvas = createGraphCanvas(); - - try { - await canvas.init(); - await testCase({ - container: canvas, - animation: false, - theme: 'light', - }); - await expect(canvas).toMatchSVGSnapshot(`${__dirname}/snapshots/static`, name); - } finally { - canvas.destroy(); - await sleep(50); - } - }); - } -}); diff --git a/packages/g6/__tests__/main.ts b/packages/g6/__tests__/main.ts index ff91b68099f..0535276bae0 100644 --- a/packages/g6/__tests__/main.ts +++ b/packages/g6/__tests__/main.ts @@ -1,31 +1,26 @@ import type { Controller } from 'lil-gui'; import GUI from 'lil-gui'; import '../src/preset'; -import * as demos from './demo'; -import type { TestCase } from './demo/types'; +import * as demos from './demos'; import { createGraphCanvas } from './utils'; -const CASES = demos as unknown as { [key: string]: Record }; - type Options = { Type: string; Demo: string; Renderer: string; Theme: string; Animation: boolean; - Timer: string; [keys: string]: any; }; const options: Options = { - Type: 'statics', - Demo: Object.keys(demos['statics'])[0], + Type: 'cases', + Demo: Object.keys(demos)[0], Renderer: 'canvas', GridLine: true, Theme: 'light', Animation: true, interval: 0, - Timer: '0ms', Reload: () => {}, forms: [], }; @@ -36,16 +31,11 @@ syncParamsFromSearch(); const panels = initPanel(); -function getDemos() { - return Object.keys(CASES[options.Type]); -} - window.onload = render; function initPanel() { const panel = new GUI({ container: document.getElementById('panel')!, autoPlace: true }); - const Type = panel.add(options, 'Type', Object.keys(CASES)).onChange(() => Demo.options(getDemos())); - const Demo = panel.add(options, 'Demo', getDemos()).onChange(render); + const Demo = panel.add(options, 'Demo', Object.keys(demos)).onChange(render); const Renderer = panel.add(options, 'Renderer', { Canvas: 'canvas', SVG: 'svg', WebGL: 'webgl' }).onChange(render); const Theme = panel.add(options, 'Theme', { Light: 'light', Dark: 'dark' }).onChange(render); const GridLine = panel.add(options, 'GridLine').onChange(() => { @@ -53,26 +43,24 @@ function initPanel() { applyGridLine(); }); const Animation = panel.add(options, 'Animation').onChange(render); - const Timer = panel.add(options, 'Timer').disable(); const reload = panel.add(options, 'Reload').onChange(render); - return { panel, Type, Demo, Renderer, GridLine, Theme, Animation, Timer, reload }; + return { panel, Demo, Renderer, GridLine, Theme, Animation, reload }; } async function render() { syncParamsToSearch(); applyTheme(); destroyForm(); - panels.Timer.setValue('0ms'); const $container = initContainer(); applyGridLine(); // render - const { Renderer, Type, Demo, Animation, Theme } = options; + const { Renderer, Demo, Animation, Theme } = options; const canvas = createGraphCanvas($container, 500, 500, Renderer); await canvas.init(); - const testCase = CASES[Type][Demo]; + const testCase = demos[Demo as keyof typeof demos]; if (!testCase) return; const result = await testCase({ container: canvas, animation: Animation, theme: Theme }); @@ -80,17 +68,6 @@ async function render() { Object.assign(window, { graph: result }); renderForm(panels.panel, testCase.form); - - if (result?.totalDuration) { - const formatCurrentTime = (time: number) => time.toFixed(2); - const setTimer = (time: any) => panels.Timer.setValue(`${formatCurrentTime(time)}ms`); - const onframe = result.onframe; - result.onframe = function (frame) { - onframe?.call(this, frame); - setTimer(frame.currentTime); - }; - result.finished.then(() => setTimer(result.currentTime)); - } } function renderForm(panel: GUI, form: TestCase['form']) { diff --git a/packages/g6/__tests__/setup.ts b/packages/g6/__tests__/setup.ts index e84b9397aca..a4d2c25c276 100644 --- a/packages/g6/__tests__/setup.ts +++ b/packages/g6/__tests__/setup.ts @@ -1,4 +1,3 @@ -import '@/src/preset'; import 'jest-canvas-mock'; import './utils/to-be-close-to'; import './utils/use-snapshot-matchers'; diff --git a/packages/g6/__tests__/snapshots/animations/element-position/default-0.svg b/packages/g6/__tests__/snapshots/animations/element-position/default-0.svg new file mode 100644 index 00000000000..a2b647e0a31 --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-position/default-0.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-position/default-1000.svg b/packages/g6/__tests__/snapshots/animations/element-position/default-1000.svg new file mode 100644 index 00000000000..ef30cb51fbc --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-position/default-1000.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-position/default-200.svg b/packages/g6/__tests__/snapshots/animations/element-position/default-200.svg new file mode 100644 index 00000000000..a581d3fc5b0 --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-position/default-200.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-state/default-0.svg b/packages/g6/__tests__/snapshots/animations/element-state/default-0.svg new file mode 100644 index 00000000000..87e781b40dd --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-state/default-0.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-state/default-1000.svg b/packages/g6/__tests__/snapshots/animations/element-state/default-1000.svg new file mode 100644 index 00000000000..61c845c295a --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-state/default-1000.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-state/default-200.svg b/packages/g6/__tests__/snapshots/animations/element-state/default-200.svg new file mode 100644 index 00000000000..9e8ddf15007 --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-state/default-200.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-style-position/default-0.svg b/packages/g6/__tests__/snapshots/animations/element-style-position/default-0.svg new file mode 100644 index 00000000000..d66a8a0b436 --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-style-position/default-0.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-style-position/default-1000.svg b/packages/g6/__tests__/snapshots/animations/element-style-position/default-1000.svg new file mode 100644 index 00000000000..197da56ec95 --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-style-position/default-1000.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/animations/element-style-position/default-200.svg b/packages/g6/__tests__/snapshots/animations/element-style-position/default-200.svg new file mode 100644 index 00000000000..68a65ab4c2e --- /dev/null +++ b/packages/g6/__tests__/snapshots/animations/element-style-position/default-200.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg deleted file mode 100644 index 06877ec7369..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - 2 - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/default.svg deleted file mode 100644 index dcf83d24618..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/default.svg +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/expand-combo-1.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/expand-combo-1.svg deleted file mode 100644 index f93d22b0b63..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/expand-combo-1.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-canvas/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-canvas/default.svg deleted file mode 100644 index 328939d55bf..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-canvas/default.svg +++ /dev/null @@ -1,2443 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/default.svg deleted file mode 100644 index f93d22b0b63..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/default.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-move.svg deleted file mode 100644 index 5a16db23aa4..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-move.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-out.svg deleted file mode 100644 index b79f65081e4..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-after-drop-out.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-move.svg deleted file mode 100644 index 59aedb1e4dc..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-move.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-out.svg deleted file mode 100644 index 930dad83f8c..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-1-before-drop-out.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-after-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-after-drop-into.svg deleted file mode 100644 index 3f79bf27743..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-after-drop-into.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-before-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-before-drop-into.svg deleted file mode 100644 index 61ac4babe10..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-combo-2-before-drop-into.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-into.svg deleted file mode 100644 index 8a44b5784d2..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-into.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-move.svg deleted file mode 100644 index 924b7f5c6f1..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-move.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-out.svg deleted file mode 100644 index dbba50db697..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-after-drop-out.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-into.svg deleted file mode 100644 index 8a44b5784d2..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-into.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-move.svg deleted file mode 100644 index de027dd734f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-move.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-out.svg deleted file mode 100644 index fa0370da67b..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-1-before-drop-out.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-1 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-after-drop-out.svg deleted file mode 100644 index d5b217be657..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-after-drop-out.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-before-drop-out.svg deleted file mode 100644 index 6cffad34d0e..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element-combo/drag-node-2-before-drop-out.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-2 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/after-drag.svg deleted file mode 100644 index ad3797a7b10..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/after-drag.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/default.svg deleted file mode 100644 index f3e4ceada3f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/default.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow-after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow-after-drag.svg deleted file mode 100644 index 60f587ceee7..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow-after-drag.svg +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg deleted file mode 100644 index 500da25d412..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg deleted file mode 100644 index 3df3709dc08..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-both.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-both.svg deleted file mode 100644 index 80c58a0e99d..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-both.svg +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-in.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-in.svg deleted file mode 100644 index cc76102d80a..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-in.svg +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-out.svg deleted file mode 100644 index 475280cfbf5..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/hideEdge-out.svg +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow-after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow-after-drag.svg deleted file mode 100644 index 2f9a0a02247..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow-after-drag.svg +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow.svg deleted file mode 100644 index b2b4cd608e6..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/shadow.svg +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/default.svg deleted file mode 100644 index f3e4ceada3f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/default.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-combo.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-combo.svg deleted file mode 100644 index d93b8f6c53a..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-combo.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-1.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-1.svg deleted file mode 100644 index 3e00d32f342..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-1.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-2.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-2.svg deleted file mode 100644 index 081801405ad..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-2.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-3.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-3.svg deleted file mode 100644 index 58674c1be90..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-3.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-4.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-4.svg deleted file mode 100644 index 3de40bc47bc..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-focus-element/focus-node-4.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-edge.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-edge.svg deleted file mode 100644 index f0b92685ac1..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-edge.svg +++ /dev/null @@ -1,2645 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-node.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-node.svg deleted file mode 100644 index 5ddcf70501f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/1-degree-node.svg +++ /dev/null @@ -1,3087 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-edge.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-edge.svg deleted file mode 100644 index 5ddcf70501f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-edge.svg +++ /dev/null @@ -1,3087 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-node.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-node.svg deleted file mode 100644 index 1e498101c66..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/2-degree-node.svg +++ /dev/null @@ -1,3619 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover-out.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover-out.svg deleted file mode 100644 index cd1b5ee6dcf..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover-out.svg +++ /dev/null @@ -1,2443 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover.svg deleted file mode 100644 index 8b40738053f..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/after-hover.svg +++ /dev/null @@ -1,2458 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/default.svg deleted file mode 100644 index cd1b5ee6dcf..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/default.svg +++ /dev/null @@ -1,2443 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/state.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/state.svg deleted file mode 100644 index 9d97972bdff..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-hover-element/state.svg +++ /dev/null @@ -1,2611 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-zoom-canvas/default.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-zoom-canvas/default.svg deleted file mode 100644 index 2eab53c8733..00000000000 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-zoom-canvas/default.svg +++ /dev/null @@ -1,2446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/collapse-expand/collapse-combo-2.svg b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/collapse-combo-2.svg new file mode 100644 index 00000000000..952b98fe2fe --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/collapse-combo-2.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + combo-2 + + + + + + + 2 + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/collapse-expand/default.svg b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/default.svg new file mode 100644 index 00000000000..064195bedcd --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/default.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/collapse-expand/expand-combo-1.svg b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/expand-combo-1.svg new file mode 100644 index 00000000000..6d6fca59392 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/collapse-expand/expand-combo-1.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-canvas/default.svg b/packages/g6/__tests__/snapshots/behaviors/drag-canvas/default.svg new file mode 100644 index 00000000000..f47b874c415 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-canvas/default.svg @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/default.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/default.svg new file mode 100644 index 00000000000..6d6fca59392 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/default.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-move.svg new file mode 100644 index 00000000000..37e7f76e455 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-move.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-out.svg new file mode 100644 index 00000000000..d8988cbf198 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-after-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-move.svg new file mode 100644 index 00000000000..a59264e3623 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-move.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-out.svg new file mode 100644 index 00000000000..d3ef2e0a10e --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-1-before-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-after-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-after-drop-into.svg new file mode 100644 index 00000000000..881032abd07 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-after-drop-into.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-before-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-before-drop-into.svg new file mode 100644 index 00000000000..7c957d44032 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-combo-2-before-drop-into.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-into.svg new file mode 100644 index 00000000000..631ef188826 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-into.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-move.svg new file mode 100644 index 00000000000..7254d7b94c4 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-move.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-out.svg new file mode 100644 index 00000000000..265c1151c11 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-after-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-into.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-into.svg new file mode 100644 index 00000000000..631ef188826 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-into.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-move.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-move.svg new file mode 100644 index 00000000000..48b53ac66ba --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-move.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-out.svg new file mode 100644 index 00000000000..bdbad532cef --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-1-before-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-1 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-after-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-after-drop-out.svg new file mode 100644 index 00000000000..ba7c6989fdb --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-after-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-before-drop-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-before-drop-out.svg new file mode 100644 index 00000000000..7109482b7b9 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element-combo/drag-node-2-before-drop-out.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-2 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/after-drag.svg new file mode 100644 index 00000000000..7e12531ec66 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/after-drag.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/default.svg new file mode 100644 index 00000000000..98601209dc6 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/default.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow-after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow-after-drag.svg new file mode 100644 index 00000000000..20a146aac98 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow-after-drag.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow.svg new file mode 100644 index 00000000000..53e0237e89d --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo-shadow.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo.svg new file mode 100644 index 00000000000..50aaa695369 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/drag-combo.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-both.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-both.svg new file mode 100644 index 00000000000..627ff927666 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-both.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-in.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-in.svg new file mode 100644 index 00000000000..dee653784f1 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-in.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-out.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-out.svg new file mode 100644 index 00000000000..7fe3d858342 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/hideEdge-out.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow-after-drag.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow-after-drag.svg new file mode 100644 index 00000000000..23aeed4bbc4 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow-after-drag.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow.svg b/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow.svg new file mode 100644 index 00000000000..d4c7ba11fc9 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/drag-element/shadow.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/default.svg new file mode 100644 index 00000000000..98601209dc6 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/default.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-combo.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-combo.svg new file mode 100644 index 00000000000..692e69e0c99 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-combo.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-1.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-1.svg new file mode 100644 index 00000000000..b5ee683f7d7 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-1.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-2.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-2.svg new file mode 100644 index 00000000000..b40084b7f1b --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-2.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-3.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-3.svg new file mode 100644 index 00000000000..c5d7439ed10 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-3.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-4.svg b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-4.svg new file mode 100644 index 00000000000..4d8f40010c1 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/focus-element/focus-node-4.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-edge.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-edge.svg new file mode 100644 index 00000000000..ccda72fcb42 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-edge.svg @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-node.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-node.svg new file mode 100644 index 00000000000..65eb3a022fe --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/1-degree-node.svg @@ -0,0 +1,703 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-edge.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-edge.svg new file mode 100644 index 00000000000..65eb3a022fe --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-edge.svg @@ -0,0 +1,703 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-node.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-node.svg new file mode 100644 index 00000000000..6439a97e3d1 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/2-degree-node.svg @@ -0,0 +1,811 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover-out.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover-out.svg new file mode 100644 index 00000000000..5f48254f30f --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover-out.svg @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover.svg new file mode 100644 index 00000000000..77c0c5fed8f --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/after-hover.svg @@ -0,0 +1,605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/default.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/default.svg new file mode 100644 index 00000000000..5f48254f30f --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/default.svg @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/hover-element/state.svg b/packages/g6/__tests__/snapshots/behaviors/hover-element/state.svg new file mode 100644 index 00000000000..ae894666085 --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/hover-element/state.svg @@ -0,0 +1,605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/behaviors/zoom-canvas/default.svg b/packages/g6/__tests__/snapshots/behaviors/zoom-canvas/default.svg new file mode 100644 index 00000000000..c92c74a576c --- /dev/null +++ b/packages/g6/__tests__/snapshots/behaviors/zoom-canvas/default.svg @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/change-type/change-type.svg b/packages/g6/__tests__/snapshots/elements/change-type/change-type.svg new file mode 100644 index 00000000000..0c1f7459e78 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/change-type/change-type.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/change-type/change_type.svg b/packages/g6/__tests__/snapshots/elements/change-type/change_type.svg deleted file mode 100644 index e00b05de857..00000000000 --- a/packages/g6/__tests__/snapshots/elements/change-type/change_type.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/change-type/default.svg b/packages/g6/__tests__/snapshots/elements/change-type/default.svg index cd96ab700c2..7bb73523383 100644 --- a/packages/g6/__tests__/snapshots/elements/change-type/default.svg +++ b/packages/g6/__tests__/snapshots/elements/change-type/default.svg @@ -1,76 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomLeft.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomLeft.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomRight.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomRight.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottomRight.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-center.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-center.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-center.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-center.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-left.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-left.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-left.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-left.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-right.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-right.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-right.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-right.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-top.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-top.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-top.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-top.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topLeft.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topLeft.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topRight.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topRight.svg index 3bb8c997aa3..8846d7c9881 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-topRight.svg @@ -1,53 +1,23 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-childCount.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-childCount.svg index 61b9c8bdc35..518d6384946 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-childCount.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-childCount.svg @@ -1,68 +1,30 @@ - - - - - - - - - - - - - combo-2 - - - - - - - 2 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + 2 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-custom.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-custom.svg index 8b7e1be544b..d55d4b86854 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-custom.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-custom.svg @@ -1,68 +1,30 @@ - - - - - - - - - - - - - combo-2 - - - - - - - 2nodes - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + 2nodes + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-descendantCount.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-descendantCount.svg index a2a1663d8ff..df4227d6b28 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-descendantCount.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-descendantCount.svg @@ -1,68 +1,30 @@ - - - - - - - - - - - - - combo-2 - - - - - - - 4 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + 4 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-nodeCount.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-nodeCount.svg index f7825209768..922acf95cad 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-marker-nodeCount.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-marker-nodeCount.svg @@ -1,68 +1,30 @@ - - - - - - - - - - - - - combo-2 - - - - - - - 3 - - - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + 3 + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/default.svg b/packages/g6/__tests__/snapshots/elements/combo/default.svg index 5aa02eeab63..afc8d0cdd22 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/default.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/default.svg @@ -1,234 +1,87 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottom.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottom.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottom.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottom.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg index 0903be325f3..efa43c06435 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg @@ -1,146 +1,56 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-controlPoints.svg deleted file mode 100644 index 709f1b45692..00000000000 --- a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-controlPoints.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-radius.svg b/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-radius.svg deleted file mode 100644 index e81d552a1c4..00000000000 --- a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-radius.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-has-controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-has-controlPoints.svg deleted file mode 100644 index 870f1c9abc1..00000000000 --- a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-has-controlPoints.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-no-controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-no-controlPoints.svg deleted file mode 100644 index e52c49f77b4..00000000000 --- a/packages/g6/__tests__/snapshots/elements/edge-polyline/edge-polyline-router-no-controlPoints.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/arrow/default.svg b/packages/g6/__tests__/snapshots/elements/edges/arrow/default.svg new file mode 100644 index 00000000000..397ad566552 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/arrow/default.svg @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + default-arrow + + + + + + + + + + + + + + + + + + + + + triangle-arrow + + + + + + + + + + + + + + + + + + + + + simple-arrow + + + + + + + + + + + + + + + + + + + + + vee-arrow + + + + + + + + + + + + + + + + + + + + + circle-arrow + + + + + + + + + + + + + + + + + + + + + rect-arrow + + + + + + + + + + + + + + + + + + + + + diamond-arrow + + + + + + + + + + + + + + + + + + + + + triangleRect-arrow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/cubic-horizontal/default.svg b/packages/g6/__tests__/snapshots/elements/edges/cubic-horizontal/default.svg new file mode 100644 index 00000000000..303921da3ae --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/cubic-horizontal/default.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + line-default + + + + + + + + + + + + + + + + + + + + + + + + + line-active + + + + + + + + + + + + + + + + + + + + + + + + + line-selected + + + + + + + + + + + + + + + + + + + + + line-highlight + + + + + + + + + + + + + + + + + + + + + line-inactive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/cubic-vertical/default.svg b/packages/g6/__tests__/snapshots/elements/edges/cubic-vertical/default.svg new file mode 100644 index 00000000000..ac61d63a9c8 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/cubic-vertical/default.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + line-default + + + + + + + + + + + + + + + + + + + + + + + + + line-active + + + + + + + + + + + + + + + + + + + + + + + + + line-selected + + + + + + + + + + + + + + + + + + + + + line-highlight + + + + + + + + + + + + + + + + + + + + + line-inactive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/cubic/default.svg b/packages/g6/__tests__/snapshots/elements/edges/cubic/default.svg new file mode 100644 index 00000000000..fce04f3877c --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/cubic/default.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + line-default + + + + + + + + + + + + + + + + + + + + + + + + + line-active + + + + + + + + + + + + + + + + + + + + + + + + + line-selected + + + + + + + + + + + + + + + + + + + + + line-highlight + + + + + + + + + + + + + + + + + + + + + line-inactive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/custom-arrow/default.svg b/packages/g6/__tests__/snapshots/elements/edges/custom-arrow/default.svg new file mode 100644 index 00000000000..4fd9ffb6054 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/custom-arrow/default.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + custom-arrow-1 + + + + + + + + + + + + + + + + + + + + + custom-arrow-2 + + + + + + + + + + + + + + + + + + + + + image-arrow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/line/default.svg b/packages/g6/__tests__/snapshots/elements/edges/line/default.svg new file mode 100644 index 00000000000..35ee5124d8b --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/line/default.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + line-default + + + + + + + + + + + + + + + + + + + + + + + + + line-active + + + + + + + + + + + + + + + + + + + + + + + + + line-selected + + + + + + + + + + + + + + + + + + + + + line-highlight + + + + + + + + + + + + + + + + + + + + + line-inactive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/loop-curve/default.svg b/packages/g6/__tests__/snapshots/elements/edges/loop-curve/default.svg new file mode 100644 index 00000000000..9790628d7f3 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/loop-curve/default.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/loop-polyline/default.svg b/packages/g6/__tests__/snapshots/elements/edges/loop-polyline/default.svg new file mode 100644 index 00000000000..b0a72f8e8ac --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/loop-polyline/default.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/controlPoints.svg new file mode 100644 index 00000000000..b2cb62f0d44 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/controlPoints.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-has-controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-has-controlPoints.svg new file mode 100644 index 00000000000..b73d9cd60c3 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-has-controlPoints.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-no-controlPoints.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-no-controlPoints.svg new file mode 100644 index 00000000000..6f0b19e05d8 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/edge-polyline-router-no-controlPoints.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/radius.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/radius.svg new file mode 100644 index 00000000000..f5ddfd9da66 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-animation/radius.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline/default.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline/default.svg new file mode 100644 index 00000000000..fdaa35ad0ea --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline/default.svg @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Loop + + + + + + + + + + + + Loop + + + + + + + + + + + + + + + + + + Loop + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + + + + + + 7 + + + + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/port/default.svg b/packages/g6/__tests__/snapshots/elements/edges/port/default.svg new file mode 100644 index 00000000000..a3d9223e6a1 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/port/default.svg @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + sourcePort❓ + + + targetPort❓ + + + + + + + + + + + + + + + + + + + + sourcePort✅ + + + targetPort✅ + + + + + + + + + + + + + + + + + + + + sourcePort✖️ + + + targetPort✖️ + + + + + + + + + + + + + + + + + + + + sourcePort✖️ + + + targetPort✅ + + + + + + + + + + + + + + + + + + + + sourcePort✅ + + + targetPort✖️ + + + + + + + + + + + + + + + + + + + + sourcePort❓ + + + targetPort✖️ + + + + + + + + + + + + + + + + + + + + sourcePort❓ + + + targetPort✅ + + + + + + + + + + + + + + + + + + + + sourcePort✖️ + + + targetPort❓ + + + + + + + + + + + + + + + + + + + + sourcePort✅ + + + targetPort❓ + + + + + + + + + + + + + + + + + + + + sourcePort✅ + + + targetPort❓ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/edges/quadratic/default.svg b/packages/g6/__tests__/snapshots/elements/edges/quadratic/default.svg new file mode 100644 index 00000000000..1e15e7c0943 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/edges/quadratic/default.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + line-default + + + + + + + + + + + + + + + + + + + + + + + + + line-active + + + + + + + + + + + + + + + + + + + + + + + + + line-selected + + + + + + + + + + + + + + + + + + + + + line-highlight + + + + + + + + + + + + + + + + + + + + + line-inactive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/label-background/default.svg b/packages/g6/__tests__/snapshots/elements/label-background/default.svg new file mode 100644 index 00000000000..002cc1b1e58 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/label-background/default.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + edge1 + + + + + + + + + + + + + + edge2 + + + + + + + + + + + + + + edge3 + + + + + + + + + + + + + + + + + node1 + + + + + + + + + + + + + + + node2 + + + + + + + + + + + + + + + node3 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/label-oversized/default.svg b/packages/g6/__tests__/snapshots/elements/label-oversized/default.svg new file mode 100644 index 00000000000..e52fc183f10 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/label-oversized/default.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + This label is too long to + + + be displayed + + + + + + + + + + + + + + + + + + + This label is + + + too long to be + + + displayed + + + + + + + + + + + + + + + + + This label is too long to + + + be displayed + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/circle/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/circle/default.svg new file mode 100644 index 00000000000..6d72d1be234 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/circle/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + circle + + + + + + + + + + + + + + + + + + + + circle-halo + + + + + + + + + + + + + + + + + circle-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + circle-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + circle-active + + + + + + + + + + + + + + + + + + + + circle-selected + + + + + + + + + + + + + + + + + circle-highlight + + + + + + + + + + + + + + + + + circle-inactive + + + + + + + + + + + + + + + + + circle-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/diamond/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/diamond/default.svg new file mode 100644 index 00000000000..5e4fa7dc577 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/diamond/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + diamond + + + + + + + + + + + + + + + + + + + + diamond-halo + + + + + + + + + + + + + + + + + diamond-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + diamond-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diamond-active + + + + + + + + + + + + + + + + + + + + diamond-selected + + + + + + + + + + + + + + + + + diamond-highlight + + + + + + + + + + + + + + + + + diamond-inactive + + + + + + + + + + + + + + + + + diamond-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/ellipse/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/ellipse/default.svg new file mode 100644 index 00000000000..0b27bc8e23d --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/ellipse/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + ellipse + + + + + + + + + + + + + + + + + + + + ellipse-halo + + + + + + + + + + + + + + + + + ellipse-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + ellipse-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ellipse-active + + + + + + + + + + + + + + + + + + + + ellipse-selected + + + + + + + + + + + + + + + + + ellipse-highlight + + + + + + + + + + + + + + + + + ellipse-inactive + + + + + + + + + + + + + + + + + ellipse-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/hexagon/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/hexagon/default.svg new file mode 100644 index 00000000000..06627ec3abf --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/hexagon/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + hexagon + + + + + + + + + + + + + + + + + + + + hexagon-halo + + + + + + + + + + + + + + + + + hexagon-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + hexagon-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hexagon-active + + + + + + + + + + + + + + + + + + + + hexagon-selected + + + + + + + + + + + + + + + + + hexagon-highlight + + + + + + + + + + + + + + + + + hexagon-inactive + + + + + + + + + + + + + + + + + hexagon-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/image/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/image/default.svg new file mode 100644 index 00000000000..08897f84301 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/image/default.svg @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + image + + + + + + + + + + + + + + + image-halo + + + + + + + + + + + + image-badges + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + image-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + image-active + + + + + + + + + + + + + + + image-selected + + + + + + + + + + + + image-highlight + + + + + + + + + + + + image-inactive + + + + + + + + + + + + image-disabled + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/rect/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/rect/default.svg new file mode 100644 index 00000000000..261e4e03172 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/rect/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + rect + + + + + + + + + + + + + + + + + + + + rect-halo + + + + + + + + + + + + + + + + + rect-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + rect-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rect-active + + + + + + + + + + + + + + + + + + + + rect-selected + + + + + + + + + + + + + + + + + rect-highlight + + + + + + + + + + + + + + + + + rect-inactive + + + + + + + + + + + + + + + + + rect-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/star/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/star/default.svg new file mode 100644 index 00000000000..21279b7090c --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/star/default.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + star + + + + + + + + + + + + + + + + + + + + star-halo + + + + + + + + + + + + + + + + + star-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + star-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + star-active + + + + + + + + + + + + + + + + + + + + star-selected + + + + + + + + + + + + + + + + + star-highlight + + + + + + + + + + + + + + + + + star-inactive + + + + + + + + + + + + + + + + + star-disabled + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/nodes/triangle/default.svg b/packages/g6/__tests__/snapshots/elements/nodes/triangle/default.svg new file mode 100644 index 00000000000..96f2bfb8595 --- /dev/null +++ b/packages/g6/__tests__/snapshots/elements/nodes/triangle/default.svg @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + triangle + + + + + + + + + + + + + + + + + + + + triangle-halo + + + + + + + + + + + + + + + + + triangle-badges + + + + + + + + + + + + + + + + A + + + + + + + + + + + + Important + + + + + + + + + + + + Notice + + + + + + + + + + + + + triangle-ports + + + + + + + + + + + + + + + + + + + + + + + + + + + + + triangle-active + + + + + + + + + + + + + + + + + + + + triangle-selected + + + + + + + + + + + + + + + + + triangle-highlight + + + + + + + + + + + + + + + + + triangle-inactive + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/port/port_hidden.svg b/packages/g6/__tests__/snapshots/elements/port/port_hidden.svg index b355d9a633f..3681b215f8e 100644 --- a/packages/g6/__tests__/snapshots/elements/port/port_hidden.svg +++ b/packages/g6/__tests__/snapshots/elements/port/port_hidden.svg @@ -1,211 +1,55 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/port/port_linkToCenter.svg b/packages/g6/__tests__/snapshots/elements/port/port_linkToCenter.svg index 6a725d77958..44c1b885f5b 100644 --- a/packages/g6/__tests__/snapshots/elements/port/port_linkToCenter.svg +++ b/packages/g6/__tests__/snapshots/elements/port/port_linkToCenter.svg @@ -1,250 +1,64 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/port/port_show.svg b/packages/g6/__tests__/snapshots/elements/port/port_show.svg index 5074a720cf8..e06765332d0 100644 --- a/packages/g6/__tests__/snapshots/elements/port/port_show.svg +++ b/packages/g6/__tests__/snapshots/elements/port/port_show.svg @@ -1,250 +1,64 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position-combo/default.svg b/packages/g6/__tests__/snapshots/elements/position-combo/default.svg index 2e672ef6268..14f9fb891b3 100644 --- a/packages/g6/__tests__/snapshots/elements/position-combo/default.svg +++ b/packages/g6/__tests__/snapshots/elements/position-combo/default.svg @@ -1,239 +1,96 @@ - - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-4 - - - - - - - + + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position/default.svg b/packages/g6/__tests__/snapshots/elements/position/default.svg index 352aec8fe1f..ba4d1f432f4 100644 --- a/packages/g6/__tests__/snapshots/elements/position/default.svg +++ b/packages/g6/__tests__/snapshots/elements/position/default.svg @@ -1,151 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position/translateElementBy-single.svg b/packages/g6/__tests__/snapshots/elements/position/translateElementBy-single.svg index a49201e7700..e16773313d8 100644 --- a/packages/g6/__tests__/snapshots/elements/position/translateElementBy-single.svg +++ b/packages/g6/__tests__/snapshots/elements/position/translateElementBy-single.svg @@ -1,151 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position/translateElementBy.svg b/packages/g6/__tests__/snapshots/elements/position/translateElementBy.svg index b58da0c8faf..c014c02d171 100644 --- a/packages/g6/__tests__/snapshots/elements/position/translateElementBy.svg +++ b/packages/g6/__tests__/snapshots/elements/position/translateElementBy.svg @@ -1,151 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position/translateElementTo-single.svg b/packages/g6/__tests__/snapshots/elements/position/translateElementTo-single.svg index 815f1df0b43..7c5d0c78091 100644 --- a/packages/g6/__tests__/snapshots/elements/position/translateElementTo-single.svg +++ b/packages/g6/__tests__/snapshots/elements/position/translateElementTo-single.svg @@ -1,151 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/position/translateElementTo.svg b/packages/g6/__tests__/snapshots/elements/position/translateElementTo.svg index 14c9de55d51..d1bce7bad76 100644 --- a/packages/g6/__tests__/snapshots/elements/position/translateElementTo.svg +++ b/packages/g6/__tests__/snapshots/elements/position/translateElementTo.svg @@ -1,151 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/state/default.svg b/packages/g6/__tests__/snapshots/elements/state/default.svg index 1e8bc6cd55c..938ee759eaf 100644 --- a/packages/g6/__tests__/snapshots/elements/state/default.svg +++ b/packages/g6/__tests__/snapshots/elements/state/default.svg @@ -1,207 +1,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/state/setState-single-default.svg b/packages/g6/__tests__/snapshots/elements/state/setState-single-default.svg index 045ae694593..b269315ccec 100644 --- a/packages/g6/__tests__/snapshots/elements/state/setState-single-default.svg +++ b/packages/g6/__tests__/snapshots/elements/state/setState-single-default.svg @@ -1,208 +1,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/state/setState-single.svg b/packages/g6/__tests__/snapshots/elements/state/setState-single.svg index 8a6a8cda8aa..cdcaea92c36 100644 --- a/packages/g6/__tests__/snapshots/elements/state/setState-single.svg +++ b/packages/g6/__tests__/snapshots/elements/state/setState-single.svg @@ -1,223 +1,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/state/setState.svg b/packages/g6/__tests__/snapshots/elements/state/setState.svg index 639bac7fdc9..bf8902cc302 100644 --- a/packages/g6/__tests__/snapshots/elements/state/setState.svg +++ b/packages/g6/__tests__/snapshots/elements/state/setState.svg @@ -1,223 +1,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/default.svg b/packages/g6/__tests__/snapshots/elements/visibility/default.svg index ba6d573dd54..bc301769e97 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/default.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/default.svg @@ -1,354 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/hide-single.svg b/packages/g6/__tests__/snapshots/elements/visibility/hide-single.svg index 41b9c4303ae..c3390f1156a 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/hide-single.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/hide-single.svg @@ -1,375 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/hide.svg b/packages/g6/__tests__/snapshots/elements/visibility/hide.svg index d8fe879cc6a..c16010bc015 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/hide.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/hide.svg @@ -1,375 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/show-and-hide.svg b/packages/g6/__tests__/snapshots/elements/visibility/show-and-hide.svg index 41b9c4303ae..c3390f1156a 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/show-and-hide.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/show-and-hide.svg @@ -1,375 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/show-single.svg b/packages/g6/__tests__/snapshots/elements/visibility/show-single.svg index 5e48274a9b1..c3b4a6c9bf3 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/show-single.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/show-single.svg @@ -1,375 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/visibility/show.svg b/packages/g6/__tests__/snapshots/elements/visibility/show.svg index 93d5f916639..ba717919ded 100644 --- a/packages/g6/__tests__/snapshots/elements/visibility/show.svg +++ b/packages/g6/__tests__/snapshots/elements/visibility/show.svg @@ -1,375 +1,114 @@ - - - - - - - - - - - - - - - - - - - - edge-1 - - - - - - - - - - - - - - - - - - edge-2 - - - - - - - - - - - - - - - - - - edge-3 - - - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - + + + + + + + + + + + + + + + + + + + + edge-1 + + + + + + + + + + + + + + + + + + edge-2 + + + + + + + + + + + + + + + + + + edge-3 + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/default.svg b/packages/g6/__tests__/snapshots/elements/z-index/default.svg index a64ddef4fb9..1f8039051d8 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/default.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/default.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-1.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-1.svg index 2170fcf85ab..81f26e3e8b0 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-1.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-1.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-2.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-2.svg index 385ec0bf9de..e664b1067d4 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-2.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-2.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-3.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-3.svg index 18fc1693672..66abdabba0a 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-3.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-combo-3.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-3.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-3.svg index 29b0ec7b420..6eddbc29795 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-3.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-3.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(1).svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(1).svg index 1244f9a519f..f18b8973469 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(1).svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(1).svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(2).svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(2).svg index e6c8ac32c6c..7531c11366b 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(2).svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(2).svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(3).svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(3).svg index 0ca6bb87ed4..c57c784d2c1 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(3).svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-combo-4(3).svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-1.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-1.svg index 73068928763..1c8ef0b50be 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-1.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-1.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-1 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-1 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-2.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-2.svg index bc5c80cd66a..d0e3c74ea20 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-2.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-2.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-3 - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-3 + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-3.svg b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-3.svg index aa48595755a..9a9d269a421 100644 --- a/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-3.svg +++ b/packages/g6/__tests__/snapshots/elements/z-index/drag-overlap-node-3.svg @@ -1,328 +1,118 @@ - - - - - - - - - - - - - combo-1 - - - - - - - - - - - - combo-4 - - - - - - - - - - - - combo-2 - - - - - - - - - - - - combo-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - node-1 - - - - - - - - - - - - node-2 - - - - - - - - - - - - node-3 - - - - - - - + + + + + + + + + + + + + combo-1 + + + + + + + + + + + + combo-4 + + + + + + + + + + + + combo-2 + + + + + + + + + + + + combo-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-1 + + + + + + + + + + + + node-2 + + + + + + + + + + + + node-3 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/basic.svg b/packages/g6/__tests__/snapshots/layouts/circular/basic.svg new file mode 100644 index 00000000000..b8be9be55b2 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/basic.svg @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate-division.svg b/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate-division.svg new file mode 100644 index 00000000000..0e825442cc1 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate-division.svg @@ -0,0 +1,842 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate.svg b/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate.svg new file mode 100644 index 00000000000..bcf1212ea97 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/configuration-translate.svg @@ -0,0 +1,842 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/degree.svg b/packages/g6/__tests__/snapshots/layouts/circular/degree.svg new file mode 100644 index 00000000000..6b908f105e2 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/degree.svg @@ -0,0 +1,1080 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/division.svg b/packages/g6/__tests__/snapshots/layouts/circular/division.svg new file mode 100644 index 00000000000..995ef0d382f --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/division.svg @@ -0,0 +1,1080 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-basic.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-basic.svg deleted file mode 100644 index aa868556b9f..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-basic.svg +++ /dev/null @@ -1,2370 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate-division.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate-division.svg deleted file mode 100644 index 5a4d4f9f4a2..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate-division.svg +++ /dev/null @@ -1,3834 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate.svg deleted file mode 100644 index ba4515acca4..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-configuration-translate.svg +++ /dev/null @@ -1,3810 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-degree.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-degree.svg deleted file mode 100644 index 847eebf49de..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-degree.svg +++ /dev/null @@ -1,4362 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-division.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-division.svg deleted file mode 100644 index 814449a3490..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-division.svg +++ /dev/null @@ -1,4370 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-spiral.svg b/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-spiral.svg deleted file mode 100644 index bccbc96a237..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/circular/layout-circular-spiral.svg +++ /dev/null @@ -1,4378 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/circular/spiral.svg b/packages/g6/__tests__/snapshots/layouts/circular/spiral.svg new file mode 100644 index 00000000000..c615efef382 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/circular/spiral.svg @@ -0,0 +1,1080 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/combo-layout/combined.svg b/packages/g6/__tests__/snapshots/layouts/combo-layout/combined.svg index 707fcd5a62d..f82eb4612db 100644 --- a/packages/g6/__tests__/snapshots/layouts/combo-layout/combined.svg +++ b/packages/g6/__tests__/snapshots/layouts/combo-layout/combined.svg @@ -1,3071 +1,861 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/compact-box/basic.svg b/packages/g6/__tests__/snapshots/layouts/compact-box/basic.svg index 5d272978d50..a9a808a3a7d 100644 --- a/packages/g6/__tests__/snapshots/layouts/compact-box/basic.svg +++ b/packages/g6/__tests__/snapshots/layouts/compact-box/basic.svg @@ -1,1899 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/compact-box/left-align.svg b/packages/g6/__tests__/snapshots/layouts/compact-box/left-align.svg index 0ab08b226b1..4cdf45699d8 100644 --- a/packages/g6/__tests__/snapshots/layouts/compact-box/left-align.svg +++ b/packages/g6/__tests__/snapshots/layouts/compact-box/left-align.svg @@ -1,2065 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/compact-box/top-to-bottom.svg b/packages/g6/__tests__/snapshots/layouts/compact-box/top-to-bottom.svg index 9e1202b91f8..ede178f2e13 100644 --- a/packages/g6/__tests__/snapshots/layouts/compact-box/top-to-bottom.svg +++ b/packages/g6/__tests__/snapshots/layouts/compact-box/top-to-bottom.svg @@ -1,1930 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/concentric/default.svg b/packages/g6/__tests__/snapshots/layouts/concentric/default.svg new file mode 100644 index 00000000000..a4ff0648d21 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/concentric/default.svg @@ -0,0 +1,1595 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/d3-force/default.svg b/packages/g6/__tests__/snapshots/layouts/d3-force/default.svg new file mode 100644 index 00000000000..33c4ac6e6bd --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/d3-force/default.svg @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node0 + + + + + + + + + + + + node1 + + + + + + + + + + + + node2 + + + + + + + + + + + + node3 + + + + + + + + + + + + node4 + + + + + + + + + + + + node5 + + + + + + + + + + + + node6 + + + + + + + + + + + + node7 + + + + + + + + + + + + node8 + + + + + + + + + + + + node9 + + + + + + + + + + + + node10 + + + + + + + + + + + + node11 + + + + + + + + + + + + node12 + + + + + + + + + + + + node13 + + + + + + + + + + + + node14 + + + + + + + + + + + + node15 + + + + + + + + + + + + node16 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg index 3931078719d..8f101b52170 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg @@ -1,1112 +1,325 @@ - - - - - - - - - - - - - A - - - - - - - - - - - - B - - - - - - - - - - - - C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - + + + + + + + + + + + + + A + + + + + + + + + + + + B + + + + + + + + + + + + C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg index 5096396fc2d..51c04c91df3 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg @@ -1,964 +1,264 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg b/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg index f1705809853..f83bd55f190 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg @@ -1,350 +1,119 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Kevin Spacey - - - - - - - - - - - - Saul Williams - - - - - - - - - - - - Brad Pitt - - - - - - - - - - - - Harrison Ford - - - - - - - - - - - - Luke Wilson - - - - - - - - - - - - Kevin Bacon - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kevin Spacey + + + + + + + + + + + + Saul Williams + + + + + + + + + + + + Brad Pitt + + + + + + + + + + + + Harrison Ford + + + + + + + + + + + + Luke Wilson + + + + + + + + + + + + Kevin Bacon + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/dendrogram/basic.svg b/packages/g6/__tests__/snapshots/layouts/dendrogram/basic.svg index ff70f58d2fc..65de1964e79 100644 --- a/packages/g6/__tests__/snapshots/layouts/dendrogram/basic.svg +++ b/packages/g6/__tests__/snapshots/layouts/dendrogram/basic.svg @@ -1,1899 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/dendrogram/tb.svg b/packages/g6/__tests__/snapshots/layouts/dendrogram/tb.svg index 2a0a5eaff96..1def6ffa959 100644 --- a/packages/g6/__tests__/snapshots/layouts/dendrogram/tb.svg +++ b/packages/g6/__tests__/snapshots/layouts/dendrogram/tb.svg @@ -1,1951 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/fruchterman/basic.svg b/packages/g6/__tests__/snapshots/layouts/fruchterman/basic.svg new file mode 100644 index 00000000000..5b6c7c7cd03 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/fruchterman/basic.svg @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/fruchterman/cluster.svg b/packages/g6/__tests__/snapshots/layouts/fruchterman/cluster.svg new file mode 100644 index 00000000000..a2b8ecc16f2 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/fruchterman/cluster.svg @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-basic.svg b/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-basic.svg deleted file mode 100644 index fa28a3e2d35..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-basic.svg +++ /dev/null @@ -1,2941 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-cluster.svg b/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-cluster.svg deleted file mode 100644 index 5d5b069869a..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/fruchterman/layout-fruchterman-cluster.svg +++ /dev/null @@ -1,2945 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/grid/sortby-default.svg b/packages/g6/__tests__/snapshots/layouts/grid/sortby-default.svg new file mode 100644 index 00000000000..bc7acc3ff47 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/grid/sortby-default.svg @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/grid/sortby-id.svg b/packages/g6/__tests__/snapshots/layouts/grid/sortby-id.svg new file mode 100644 index 00000000000..b97a5fbbd3a --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/grid/sortby-id.svg @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/grid/sortby_default.svg b/packages/g6/__tests__/snapshots/layouts/grid/sortby_default.svg deleted file mode 100644 index c702c674fff..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/grid/sortby_default.svg +++ /dev/null @@ -1,2911 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/grid/sortby_id.svg b/packages/g6/__tests__/snapshots/layouts/grid/sortby_id.svg deleted file mode 100644 index 0bc499fc7ea..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/grid/sortby_id.svg +++ /dev/null @@ -1,2911 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/indented/default.svg b/packages/g6/__tests__/snapshots/layouts/indented/default.svg new file mode 100644 index 00000000000..5131b1cee71 --- /dev/null +++ b/packages/g6/__tests__/snapshots/layouts/indented/default.svg @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/layout-concentric/layout-concentric-basic.svg b/packages/g6/__tests__/snapshots/layouts/layout-concentric/layout-concentric-basic.svg deleted file mode 100644 index 4e412df416d..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/layout-concentric/layout-concentric-basic.svg +++ /dev/null @@ -1,6506 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/mds/ld100.svg b/packages/g6/__tests__/snapshots/layouts/mds/ld100.svg index a4660188d28..1e54f24b623 100644 --- a/packages/g6/__tests__/snapshots/layouts/mds/ld100.svg +++ b/packages/g6/__tests__/snapshots/layouts/mds/ld100.svg @@ -1,2920 +1,840 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/mindmap/h-custom-side.svg b/packages/g6/__tests__/snapshots/layouts/mindmap/h-custom-side.svg index 33a4e71d317..8c1c1122581 100644 --- a/packages/g6/__tests__/snapshots/layouts/mindmap/h-custom-side.svg +++ b/packages/g6/__tests__/snapshots/layouts/mindmap/h-custom-side.svg @@ -1,1961 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/mindmap/h-left.svg b/packages/g6/__tests__/snapshots/layouts/mindmap/h-left.svg index d5fde536184..781e6c3bb2c 100644 --- a/packages/g6/__tests__/snapshots/layouts/mindmap/h-left.svg +++ b/packages/g6/__tests__/snapshots/layouts/mindmap/h-left.svg @@ -1,1969 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/mindmap/h-right.svg b/packages/g6/__tests__/snapshots/layouts/mindmap/h-right.svg index 85e5b913a31..cbe9d7514f9 100644 --- a/packages/g6/__tests__/snapshots/layouts/mindmap/h-right.svg +++ b/packages/g6/__tests__/snapshots/layouts/mindmap/h-right.svg @@ -1,1961 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/mindmap/h.svg b/packages/g6/__tests__/snapshots/layouts/mindmap/h.svg index 58149e55da4..377ccce187a 100644 --- a/packages/g6/__tests__/snapshots/layouts/mindmap/h.svg +++ b/packages/g6/__tests__/snapshots/layouts/mindmap/h.svg @@ -1,1973 +1,594 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modeling Methods - - - - - - - - - - - - Classification - - - - - - - - - - - - Logistic regression - - - - - - - - - - - - Linear discriminant analysis - - - - - - - - - - - - Rules - - - - - - - - - - - - Decision trees - - - - - - - - - - - - Naive Bayes - - - - - - - - - - - - K nearest neighbor - - - - - - - - - - - - Probabilistic neural network - - - - - - - - - - - - Support vector machine - - - - - - - - - - - - Consensus - - - - - - - - - - - - Models diversity - - - - - - - - - - - - Different initializations - - - - - - - - - - - - Different parameter choices - - - - - - - - - - - - Different architectures - - - - - - - - - - - - Different modeling methods - - - - - - - - - - - - Different training sets - - - - - - - - - - - - Different feature sets - - - - - - - - - - - - Methods - - - - - - - - - - - - Classifier selection - - - - - - - - - - - - Classifier fusion - - - - - - - - - - - - Common - - - - - - - - - - - - Bagging - - - - - - - - - - - - Boosting - - - - - - - - - - - - AdaBoost - - - - - - - - - - - - Regression - - - - - - - - - - - - Multiple linear regression - - - - - - - - - - - - Partial least squares - - - - - - - - - - - - Multi-layer feed forward neural network - - - - - - - - - - - - General regression neural network - - - - - - - - - - - - Support vector regression - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modeling Methods + + + + + + + + + + + + Classification + + + + + + + + + + + + Logistic regression + + + + + + + + + + + + Linear discriminant analysis + + + + + + + + + + + + Rules + + + + + + + + + + + + Decision trees + + + + + + + + + + + + Naive Bayes + + + + + + + + + + + + K nearest neighbor + + + + + + + + + + + + Probabilistic neural network + + + + + + + + + + + + Support vector machine + + + + + + + + + + + + Consensus + + + + + + + + + + + + Models diversity + + + + + + + + + + + + Different initializations + + + + + + + + + + + + Different parameter choices + + + + + + + + + + + + Different architectures + + + + + + + + + + + + Different modeling methods + + + + + + + + + + + + Different training sets + + + + + + + + + + + + Different feature sets + + + + + + + + + + + + Methods + + + + + + + + + + + + Classifier selection + + + + + + + + + + + + Classifier fusion + + + + + + + + + + + + Common + + + + + + + + + + + + Bagging + + + + + + + + + + + + Boosting + + + + + + + + + + + + AdaBoost + + + + + + + + + + + + Regression + + + + + + + + + + + + Multiple linear regression + + + + + + + + + + + + Partial least squares + + + + + + + + + + + + Multi-layer feed forward neural network + + + + + + + + + + + + General regression neural network + + + + + + + + + + + + Support vector regression + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/radial-layout/basic.svg b/packages/g6/__tests__/snapshots/layouts/radial-layout/basic.svg index 256b5f6150f..3fd0905407b 100644 --- a/packages/g6/__tests__/snapshots/layouts/radial-layout/basic.svg +++ b/packages/g6/__tests__/snapshots/layouts/radial-layout/basic.svg @@ -1,2877 +1,826 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/radial-layout/configuration-translate.svg b/packages/g6/__tests__/snapshots/layouts/radial-layout/configuration-translate.svg deleted file mode 100644 index 7a23f69c9e2..00000000000 --- a/packages/g6/__tests__/snapshots/layouts/radial-layout/configuration-translate.svg +++ /dev/null @@ -1,4269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap-unstrict.svg b/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap-unstrict.svg index 327307c05b9..686979a90a7 100644 --- a/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap-unstrict.svg +++ b/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap-unstrict.svg @@ -1,4249 +1,1058 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap.svg b/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap.svg index 05fdee0264d..2d714f98e7b 100644 --- a/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap.svg +++ b/packages/g6/__tests__/snapshots/layouts/radial-layout/prevent-overlap.svg @@ -1,4269 +1,1058 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/layouts/radial-layout/sort.svg b/packages/g6/__tests__/snapshots/layouts/radial-layout/sort.svg index bbbb5b206c4..1a210055c39 100644 --- a/packages/g6/__tests__/snapshots/layouts/radial-layout/sort.svg +++ b/packages/g6/__tests__/snapshots/layouts/radial-layout/sort.svg @@ -1,4253 +1,1058 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg index aeb8ff26aa2..5c5b47032a1 100644 --- a/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg +++ b/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg @@ -1,3071 +1,861 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg index aeb8ff26aa2..5c5b47032a1 100644 --- a/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg +++ b/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg @@ -1,3071 +1,861 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg index aeb8ff26aa2..5c5b47032a1 100644 --- a/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg +++ b/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg @@ -1,3071 +1,861 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg index aeb8ff26aa2..5c5b47032a1 100644 --- a/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg +++ b/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg @@ -1,3071 +1,861 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - 1 - - - - - - - - - - - - 2 - - - - - - - - - - - - 3 - - - - - - - - - - - - 4 - - - - - - - - - - - - 5 - - - - - - - - - - - - 6 - - - - - - - - - - - - 7 - - - - - - - - - - - - 8 - - - - - - - - - - - - 9 - - - - - - - - - - - - 10 - - - - - - - - - - - - 11 - - - - - - - - - - - - 12 - - - - - - - - - - - - 13 - - - - - - - - - - - - 14 - - - - - - - - - - - - 15 - - - - - - - - - - - - 16 - - - - - - - - - - - - 17 - - - - - - - - - - - - 18 - - - - - - - - - - - - 19 - - - - - - - - - - - - 20 - - - - - - - - - - - - 21 - - - - - - - - - - - - 22 - - - - - - - - - - - - 23 - - - - - - - - - - - - 24 - - - - - - - - - - - - 25 - - - - - - - - - - - - 26 - - - - - - - - - - - - 27 - - - - - - - - - - - - 28 - - - - - - - - - - - - 29 - - - - - - - - - - - - 30 - - - - - - - - - - - - 31 - - - - - - - - - - - - 32 - - - - - - - - - - - - 33 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 4 + + + + + + + + + + + + 5 + + + + + + + + + + + + 6 + + + + + + + + + + + + 7 + + + + + + + + + + + + 8 + + + + + + + + + + + + 9 + + + + + + + + + + + + 10 + + + + + + + + + + + + 11 + + + + + + + + + + + + 12 + + + + + + + + + + + + 13 + + + + + + + + + + + + 14 + + + + + + + + + + + + 15 + + + + + + + + + + + + 16 + + + + + + + + + + + + 17 + + + + + + + + + + + + 18 + + + + + + + + + + + + 19 + + + + + + + + + + + + 20 + + + + + + + + + + + + 21 + + + + + + + + + + + + 22 + + + + + + + + + + + + 23 + + + + + + + + + + + + 24 + + + + + + + + + + + + 25 + + + + + + + + + + + + 26 + + + + + + + + + + + + 27 + + + + + + + + + + + + 28 + + + + + + + + + + + + 29 + + + + + + + + + + + + 30 + + + + + + + + + + + + 31 + + + + + + + + + + + + 32 + + + + + + + + + + + + 33 + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/default.svg b/packages/g6/__tests__/snapshots/runtime/element/default.svg index ef703b3370a..a66d0a87472 100644 --- a/packages/g6/__tests__/snapshots/runtime/element/default.svg +++ b/packages/g6/__tests__/snapshots/runtime/element/default.svg @@ -1,176 +1,54 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/visibility/hidden.svg b/packages/g6/__tests__/snapshots/runtime/element/visibility/hidden.svg index 4b907d95a8b..8cdbe9480b0 100644 --- a/packages/g6/__tests__/snapshots/runtime/element/visibility/hidden.svg +++ b/packages/g6/__tests__/snapshots/runtime/element/visibility/hidden.svg @@ -1,159 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/visibility/visible.svg b/packages/g6/__tests__/snapshots/runtime/element/visibility/visible.svg index 57291c360e2..05150ef6b57 100644 --- a/packages/g6/__tests__/snapshots/runtime/element/visibility/visible.svg +++ b/packages/g6/__tests__/snapshots/runtime/element/visibility/visible.svg @@ -1,159 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/z-index/back.svg b/packages/g6/__tests__/snapshots/runtime/element/z-index/back.svg deleted file mode 100644 index 445ae433308..00000000000 --- a/packages/g6/__tests__/snapshots/runtime/element/z-index/back.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/z-index/default.svg b/packages/g6/__tests__/snapshots/runtime/element/z-index/default.svg index 9bcca3195e5..96236665833 100644 --- a/packages/g6/__tests__/snapshots/runtime/element/z-index/default.svg +++ b/packages/g6/__tests__/snapshots/runtime/element/z-index/default.svg @@ -1,54 +1,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/element/z-index/front.svg b/packages/g6/__tests__/snapshots/runtime/element/z-index/front.svg index 2beed6234e1..ef9c734c43d 100644 --- a/packages/g6/__tests__/snapshots/runtime/element/z-index/front.svg +++ b/packages/g6/__tests__/snapshots/runtime/element/z-index/front.svg @@ -1,54 +1,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-draw.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-draw.svg index e165d7833db..1eaa9c971f8 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-draw.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-draw.svg @@ -1,75 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-layout.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-layout.svg index 9a64db36967..333f4b6cfd9 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-layout.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-layout.svg @@ -1,104 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-rotate-90.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-rotate-90.svg index 6dbdaaa1fc2..bc39588b9d3 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-rotate-90.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-rotate-90.svg @@ -1,104 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate-node-1.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate-node-1.svg index acbd8c122be..00455c564d1 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate-node-1.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate-node-1.svg @@ -1,104 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate.svg index 6c9f13fbe4f..0ac7da40a42 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-translate.svg @@ -1,104 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-zoom-2.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-zoom-2.svg index 4adfa636f80..a188aff7e5a 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/after-zoom-2.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/after-zoom-2.svg @@ -1,104 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/before-draw.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/before-draw.svg index a75786d9bdf..cc7a84cd731 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/before-draw.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/before-draw.svg @@ -1,2443 +1,602 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/graph/graph/before-layout.svg b/packages/g6/__tests__/snapshots/runtime/graph/graph/before-layout.svg index 15f3f945914..570bd82c85f 100644 --- a/packages/g6/__tests__/snapshots/runtime/graph/graph/before-layout.svg +++ b/packages/g6/__tests__/snapshots/runtime/graph/graph/before-layout.svg @@ -1,96 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding-animation.svg index 3bee06efa56..67a7c9255eb 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding-animation.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding.svg b/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding.svg index 21c7b81c233..286f09aa164 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/auto-fit-with-padding.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/before-fit-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/before-fit-animation.svg index 97768e648ab..b52a17152db 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/before-fit-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/before-fit-animation.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/before-fit.svg b/packages/g6/__tests__/snapshots/runtime/viewport/before-fit.svg index 97768e648ab..b52a17152db 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/before-fit.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/before-fit.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter-animation.svg index 97768e648ab..b52a17152db 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter-animation.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter.svg b/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter.svg index dcddaea70f3..98c4e222682 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/fitCenter.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/fitView-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/fitView-animation.svg index db29d33d96d..744f782c663 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/fitView-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/fitView-animation.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/fitView.svg b/packages/g6/__tests__/snapshots/runtime/viewport/fitView.svg index 7ebecb7be8c..7e453858aca 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/fitView.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/fitView.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/focusElement-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/focusElement-animation.svg index ebca7a02552..186c1264209 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/focusElement-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/focusElement-animation.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/focusElement.svg b/packages/g6/__tests__/snapshots/runtime/viewport/focusElement.svg index ebca7a02552..186c1264209 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/focusElement.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/focusElement.svg @@ -1,66 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter-animation.svg index db29d33d96d..744f782c663 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter-animation.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter.svg b/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter.svg index 5713d161639..d1c5d45d1a9 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/re-fitCenter.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement-animation.svg b/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement-animation.svg index 8fae27e22bf..400f164fd4a 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement-animation.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement-animation.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement.svg b/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement.svg index 922288dcb7c..91814c4b3ef 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/re-focusElement.svg @@ -1,69 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/rotate-135.svg b/packages/g6/__tests__/snapshots/runtime/viewport/rotate-135.svg index 249e9af66ea..f505c4af75c 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/rotate-135.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/rotate-135.svg @@ -1,78 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/rotate-90.svg b/packages/g6/__tests__/snapshots/runtime/viewport/rotate-90.svg index 5f073e40f71..4b31bec89f6 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/rotate-90.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/rotate-90.svg @@ -1,75 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/translate.svg b/packages/g6/__tests__/snapshots/runtime/viewport/translate.svg index 36490ab2db8..ec11052bd9c 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/translate.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/translate.svg @@ -1,75 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/zoom-0.5.svg b/packages/g6/__tests__/snapshots/runtime/viewport/zoom-0.5.svg index 5ffa6b2188a..d5db98dadd1 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/zoom-0.5.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/zoom-0.5.svg @@ -1,78 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/runtime/viewport/zoom-2.svg b/packages/g6/__tests__/snapshots/runtime/viewport/zoom-2.svg index 460d651ed6c..a50c34bb9e7 100644 --- a/packages/g6/__tests__/snapshots/runtime/viewport/zoom-2.svg +++ b/packages/g6/__tests__/snapshots/runtime/viewport/zoom-2.svg @@ -1,75 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/snapshots/spec/theme/theme_node_palette_spectral.svg b/packages/g6/__tests__/snapshots/spec/theme/theme_node_palette_spectral.svg index 316851945ea..9f30acb87fe 100644 --- a/packages/g6/__tests__/snapshots/spec/theme/theme_node_palette_spectral.svg +++ b/packages/g6/__tests__/snapshots/spec/theme/theme_node_palette_spectral.svg @@ -1,2402 +1,602 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/g6/__tests__/types.d.ts b/packages/g6/__tests__/types.d.ts new file mode 100644 index 00000000000..569944d84c1 --- /dev/null +++ b/packages/g6/__tests__/types.d.ts @@ -0,0 +1,11 @@ +import type { G6Spec, Graph } from '@/src'; +import type { Controller, GUI } from 'lil-gui'; + +declare global { + export interface TestCase { + (context: G6Spec): Promise; + form?: (gui: GUI) => Controller[]; + } + + export type TestContext = G6Spec; +} diff --git a/packages/g6/__tests__/unit/animations/element-position.spec.ts b/packages/g6/__tests__/unit/animations/element-position.spec.ts new file mode 100644 index 00000000000..b3219c53cf5 --- /dev/null +++ b/packages/g6/__tests__/unit/animations/element-position.spec.ts @@ -0,0 +1,22 @@ +import { animationElementPosition } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('animation element position', () => { + it('animation element position', async () => { + const graph = await createDemoGraph(animationElementPosition, { animation: true }); + await expect(graph).toMatchAnimation(__filename, [0, 200, 1000], () => { + graph.translateElementTo( + { + 'node-1': [250, 100], + 'node-2': [175, 200], + 'node-3': [325, 200], + 'node-4': [100, 300], + 'node-5': [250, 300], + 'node-6': [400, 300], + }, + true, + ); + }); + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/animations/element-state.spec.ts b/packages/g6/__tests__/unit/animations/element-state.spec.ts new file mode 100644 index 00000000000..4636ee4d32d --- /dev/null +++ b/packages/g6/__tests__/unit/animations/element-state.spec.ts @@ -0,0 +1,23 @@ +import { animationElementState } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('animation element state', () => { + it('animation element state', async () => { + const graph = await createDemoGraph(animationElementState, { animation: true }); + await expect(graph).toMatchAnimation(__filename, [0, 200, 1000], () => { + graph.updateData({ + nodes: [ + { id: 'node-1', style: { states: [] } }, + { id: 'node-2', style: { states: ['active'] } }, + { id: 'node-3', style: { states: ['selected'] } }, + ], + edges: [ + { source: 'node-1', target: 'node-2', style: { states: [] } }, + { source: 'node-2', target: 'node-3', style: { states: ['active'] } }, + ], + }); + graph.draw(); + }); + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/animations/element-style-position.spec.ts b/packages/g6/__tests__/unit/animations/element-style-position.spec.ts new file mode 100644 index 00000000000..3e013bb16dd --- /dev/null +++ b/packages/g6/__tests__/unit/animations/element-style-position.spec.ts @@ -0,0 +1,19 @@ +import { animationElementStylePosition } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('animation element style and position', () => { + it('animation element style and position', async () => { + const graph = await createDemoGraph(animationElementStylePosition, { animation: true }); + await expect(graph).toMatchAnimation(__filename, [0, 200, 1000], () => { + graph.addNodeData([ + { id: 'node-4', style: { x: 50, y: 200, color: 'orange' } }, + { id: 'node-5', style: { x: 75, y: 150, color: 'purple' } }, + { id: 'node-6', style: { x: 200, y: 100, color: 'cyan' } }, + ]); + graph.removeNodeData(['node-1']); + graph.updateNodeData([{ id: 'node-2', style: { x: 200, y: 200, stroke: 'green' } }]); + graph.draw(); + }); + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/behaviors/behavior-collapse-expand.spec.ts b/packages/g6/__tests__/unit/behaviors/collapse-expand.spec.ts similarity index 87% rename from packages/g6/__tests__/unit/behaviors/behavior-collapse-expand.spec.ts rename to packages/g6/__tests__/unit/behaviors/collapse-expand.spec.ts index 97ec352127a..39350a14134 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-collapse-expand.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/collapse-expand.spec.ts @@ -1,5 +1,6 @@ -import { CommonEvent, type Graph } from '@/src'; -import { comboExpandCollapse } from '@@/demo/case'; +import { comboExpandCollapse } from '@/__tests__/demos'; +import type { Graph } from '@/src'; +import { CommonEvent } from '@/src'; import { createDemoGraph } from '@@/utils'; describe('behavior combo expand collapse', () => { diff --git a/packages/g6/__tests__/unit/behaviors/behavior-drag-canvas.spec.ts b/packages/g6/__tests__/unit/behaviors/drag-canvas.spec.ts similarity index 97% rename from packages/g6/__tests__/unit/behaviors/behavior-drag-canvas.spec.ts rename to packages/g6/__tests__/unit/behaviors/drag-canvas.spec.ts index 8182d10f103..785806e1ee3 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-drag-canvas.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/drag-canvas.spec.ts @@ -1,6 +1,6 @@ +import { behaviorDragCanvas } from '@/__tests__/demos'; import type { Graph } from '@/src'; import { CommonEvent } from '@/src'; -import { behaviorDragCanvas } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; import { isObject } from '@antv/util'; diff --git a/packages/g6/__tests__/unit/behaviors/behavior-drag-element-combo.spec.ts b/packages/g6/__tests__/unit/behaviors/drag-element-combo.spec.ts similarity index 98% rename from packages/g6/__tests__/unit/behaviors/behavior-drag-element-combo.spec.ts rename to packages/g6/__tests__/unit/behaviors/drag-element-combo.spec.ts index b1050524bd2..fb29cb07fbc 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-drag-element-combo.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/drag-element-combo.spec.ts @@ -1,5 +1,5 @@ +import { comboExpandCollapse } from '@/__tests__/demos'; import { CommonEvent, type Graph } from '@/src'; -import { comboExpandCollapse } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('behavior drag combo', () => { diff --git a/packages/g6/__tests__/unit/behaviors/behavior-drag-element.spec.ts b/packages/g6/__tests__/unit/behaviors/drag-element.spec.ts similarity index 98% rename from packages/g6/__tests__/unit/behaviors/behavior-drag-element.spec.ts rename to packages/g6/__tests__/unit/behaviors/drag-element.spec.ts index 7c9ff72d489..e539ec4273e 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-drag-element.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/drag-element.spec.ts @@ -1,6 +1,6 @@ +import { behaviorDragNode } from '@/__tests__/demos'; import type { Graph } from '@/src'; import { CommonEvent } from '@/src'; -import { behaviorDragNode } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('behavior drag element', () => { diff --git a/packages/g6/__tests__/unit/behaviors/behavior-focus-element.spec.ts b/packages/g6/__tests__/unit/behaviors/focus-element.spec.ts similarity index 95% rename from packages/g6/__tests__/unit/behaviors/behavior-focus-element.spec.ts rename to packages/g6/__tests__/unit/behaviors/focus-element.spec.ts index c21a994adc2..e98250b7c0b 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-focus-element.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/focus-element.spec.ts @@ -1,5 +1,5 @@ +import { behaviorFocusElement } from '@/__tests__/demos'; import { CommonEvent, type Graph } from '@/src'; -import { behaviorFocusElement } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('behavior focus element', () => { diff --git a/packages/g6/__tests__/unit/behaviors/behavior-hover-element.spec.ts b/packages/g6/__tests__/unit/behaviors/hover-element.spec.ts similarity index 97% rename from packages/g6/__tests__/unit/behaviors/behavior-hover-element.spec.ts rename to packages/g6/__tests__/unit/behaviors/hover-element.spec.ts index a61145c0ed0..2bba6c1e614 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-hover-element.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/hover-element.spec.ts @@ -1,5 +1,5 @@ +import { behaviorHoverElement } from '@/__tests__/demos'; import { CommonEvent, type Graph } from '@/src'; -import { behaviorHoverElement } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('behavior hover element', () => { diff --git a/packages/g6/__tests__/unit/behaviors/behavior-zoom-canvas.spec.ts b/packages/g6/__tests__/unit/behaviors/zoom-canvas.spec.ts similarity index 99% rename from packages/g6/__tests__/unit/behaviors/behavior-zoom-canvas.spec.ts rename to packages/g6/__tests__/unit/behaviors/zoom-canvas.spec.ts index 74166707a76..992ad124352 100644 --- a/packages/g6/__tests__/unit/behaviors/behavior-zoom-canvas.spec.ts +++ b/packages/g6/__tests__/unit/behaviors/zoom-canvas.spec.ts @@ -1,7 +1,7 @@ +import { behaviorZoomCanvas } from '@/__tests__/demos'; import type { Graph } from '@/src'; import { CanvasEvent, CommonEvent, ContainerEvent } from '@/src'; import type { ZoomCanvasOptions } from '@/src/behaviors/zoom-canvas'; -import { behaviorZoomCanvas } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('behavior zoom canvas', () => { diff --git a/packages/g6/__tests__/unit/elements/change-type.spec.ts b/packages/g6/__tests__/unit/elements/change-type.spec.ts index 75b138a1ab3..cbd09cc0dde 100644 --- a/packages/g6/__tests__/unit/elements/change-type.spec.ts +++ b/packages/g6/__tests__/unit/elements/change-type.spec.ts @@ -1,5 +1,5 @@ +import { elementChangeType } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementChangeType } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element change type', () => { @@ -25,6 +25,6 @@ describe('element change type', () => { await graph.draw(); - await expect(graph).toMatchSnapshot(__filename, 'change_type'); + await expect(graph).toMatchSnapshot(__filename, 'change-type'); }); }); diff --git a/packages/g6/__tests__/unit/elements/combo.spec.ts b/packages/g6/__tests__/unit/elements/combo.spec.ts index 32d9a2fa3d5..b883469cdaa 100644 --- a/packages/g6/__tests__/unit/elements/combo.spec.ts +++ b/packages/g6/__tests__/unit/elements/combo.spec.ts @@ -1,5 +1,5 @@ +import { combo } from '@/__tests__/demos'; import { type Graph } from '@/src'; -import { combo } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('combo', () => { diff --git a/packages/g6/__tests__/unit/elements/edges/arrow.spec.ts b/packages/g6/__tests__/unit/elements/edges/arrow.spec.ts new file mode 100644 index 00000000000..026e37207c3 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/arrow.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeArrow } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge arrow', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeArrow); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/cubic-horizontal.spec.ts b/packages/g6/__tests__/unit/elements/edges/cubic-horizontal.spec.ts new file mode 100644 index 00000000000..6231b0be216 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/cubic-horizontal.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeCubicHorizontal } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge cubic horizontal', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeCubicHorizontal); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/cubic-vertical.spec.ts b/packages/g6/__tests__/unit/elements/edges/cubic-vertical.spec.ts new file mode 100644 index 00000000000..878bb49ba57 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/cubic-vertical.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeCubicVertical } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge cubic vertical', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeCubicVertical); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/cubic.spec.ts b/packages/g6/__tests__/unit/elements/edges/cubic.spec.ts new file mode 100644 index 00000000000..c1268c530cd --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/cubic.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeCubic } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge cubic', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeCubic); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/custom-arrow.spec.ts b/packages/g6/__tests__/unit/elements/edges/custom-arrow.spec.ts new file mode 100644 index 00000000000..02006e0606d --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/custom-arrow.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeCustomArrow } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge custom arrow', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeCustomArrow); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/line.spec.ts b/packages/g6/__tests__/unit/elements/edges/line.spec.ts new file mode 100644 index 00000000000..ecc5147696a --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/line.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeLine } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge line', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeLine); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/loop-curve.spec.ts b/packages/g6/__tests__/unit/elements/edges/loop-curve.spec.ts new file mode 100644 index 00000000000..61476dc6386 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/loop-curve.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeLoopCurve } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge loop curve', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeLoopCurve); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/loop-polyline.spec.ts b/packages/g6/__tests__/unit/elements/edges/loop-polyline.spec.ts new file mode 100644 index 00000000000..0326a54f01f --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/loop-polyline.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeLoopPolyline } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge loop polyline', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeLoopPolyline); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edge-polyline.spec.ts b/packages/g6/__tests__/unit/elements/edges/polyline-animation.spec.ts similarity index 77% rename from packages/g6/__tests__/unit/elements/edge-polyline.spec.ts rename to packages/g6/__tests__/unit/elements/edges/polyline-animation.spec.ts index bc79b220d58..7dac0a86f23 100644 --- a/packages/g6/__tests__/unit/elements/edge-polyline.spec.ts +++ b/packages/g6/__tests__/unit/elements/edges/polyline-animation.spec.ts @@ -1,5 +1,5 @@ +import { elementEdgePolylineAnimation } from '@/__tests__/demos'; import { type Graph } from '@/src'; -import { edgePolyline } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; const updateEdgeStyle = (graph: Graph, id: string, attr: string, value: any) => { @@ -19,11 +19,11 @@ const updateEdgeStyle = (graph: Graph, id: string, attr: string, value: any) => graph.render(); }; -describe('edge polyline', () => { +describe('element edge polyline animation', () => { let graph: Graph; beforeAll(async () => { - graph = await createDemoGraph(edgePolyline, { animation: false }); + graph = await createDemoGraph(elementEdgePolylineAnimation, { animation: false }); }); afterAll(() => { @@ -33,13 +33,13 @@ describe('edge polyline', () => { it('Control Points', async () => { updateEdgeStyle(graph, 'edge-1', 'controlPoints', [[300, 190]]); - await expect(graph).toMatchSnapshot(__filename, 'edge-polyline-controlPoints'); + await expect(graph).toMatchSnapshot(__filename, 'controlPoints'); }); it('Radius', async () => { updateEdgeStyle(graph, 'edge-1', 'radius', 20); - await expect(graph).toMatchSnapshot(__filename, 'edge-polyline-radius'); + await expect(graph).toMatchSnapshot(__filename, 'radius'); updateEdgeStyle(graph, 'edge-1', 'radius', 0); }); diff --git a/packages/g6/__tests__/unit/elements/edges/polyline.spec.ts b/packages/g6/__tests__/unit/elements/edges/polyline.spec.ts new file mode 100644 index 00000000000..fbfe35f62af --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/polyline.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgePolyline } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge polyline', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgePolyline); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/port.spec.ts b/packages/g6/__tests__/unit/elements/edges/port.spec.ts new file mode 100644 index 00000000000..d6a21f68164 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/port.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgePort } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge port', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgePort); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/edges/quadratic.spec.ts b/packages/g6/__tests__/unit/elements/edges/quadratic.spec.ts new file mode 100644 index 00000000000..1e61db9df0d --- /dev/null +++ b/packages/g6/__tests__/unit/elements/edges/quadratic.spec.ts @@ -0,0 +1,11 @@ +import { elementEdgeQuadratic } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element edge quadratic', () => { + it('render', async () => { + const graph = await createDemoGraph(elementEdgeQuadratic); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/label-background.spec.ts b/packages/g6/__tests__/unit/elements/label-background.spec.ts new file mode 100644 index 00000000000..0de1f8f5251 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/label-background.spec.ts @@ -0,0 +1,11 @@ +import { elementLabelBackground } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label background', () => { + it('render', async () => { + const graph = await createDemoGraph(elementLabelBackground); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/label-oversized.spec.ts b/packages/g6/__tests__/unit/elements/label-oversized.spec.ts new file mode 100644 index 00000000000..a82d80ad239 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/label-oversized.spec.ts @@ -0,0 +1,11 @@ +import { elementLabelOversized } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementLabelOversized); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/circle.spec.ts b/packages/g6/__tests__/unit/elements/nodes/circle.spec.ts new file mode 100644 index 00000000000..825658434fe --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/circle.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeCircle } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeCircle); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/diamond.spec.ts b/packages/g6/__tests__/unit/elements/nodes/diamond.spec.ts new file mode 100644 index 00000000000..b212aaa9405 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/diamond.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeDiamond } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeDiamond); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/ellipse.spec.ts b/packages/g6/__tests__/unit/elements/nodes/ellipse.spec.ts new file mode 100644 index 00000000000..92cdf5713fe --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/ellipse.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeEllipse } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeEllipse); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/hexagon.spec.ts b/packages/g6/__tests__/unit/elements/nodes/hexagon.spec.ts new file mode 100644 index 00000000000..efec031976e --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/hexagon.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeHexagon } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeHexagon); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/image.spec.ts b/packages/g6/__tests__/unit/elements/nodes/image.spec.ts new file mode 100644 index 00000000000..43184c30059 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/image.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeImage } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeImage); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/rect.spec.ts b/packages/g6/__tests__/unit/elements/nodes/rect.spec.ts new file mode 100644 index 00000000000..613d6772738 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/rect.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeRect } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeRect); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/star.spec.ts b/packages/g6/__tests__/unit/elements/nodes/star.spec.ts new file mode 100644 index 00000000000..a412e0c9775 --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/star.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeStar } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeStar); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/nodes/triangle.spec.ts b/packages/g6/__tests__/unit/elements/nodes/triangle.spec.ts new file mode 100644 index 00000000000..18bb2b1cc7a --- /dev/null +++ b/packages/g6/__tests__/unit/elements/nodes/triangle.spec.ts @@ -0,0 +1,11 @@ +import { elementNodeTriangle } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('element label oversized', () => { + it('render', async () => { + const graph = await createDemoGraph(elementNodeTriangle); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/elements/port.spec.ts b/packages/g6/__tests__/unit/elements/port.spec.ts index 78ffef5ac2e..4065c18d1c8 100644 --- a/packages/g6/__tests__/unit/elements/port.spec.ts +++ b/packages/g6/__tests__/unit/elements/port.spec.ts @@ -1,5 +1,5 @@ +import { elementPort } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementPort } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; const updatePort = (graph: Graph, attr: string, value: string | boolean | number) => { diff --git a/packages/g6/__tests__/unit/elements/position-combo.spec.ts b/packages/g6/__tests__/unit/elements/position-combo.spec.ts index 785f1515200..51b45bb7f88 100644 --- a/packages/g6/__tests__/unit/elements/position-combo.spec.ts +++ b/packages/g6/__tests__/unit/elements/position-combo.spec.ts @@ -1,5 +1,5 @@ +import { elementPositionCombo } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementPositionCombo } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element position combo', () => { diff --git a/packages/g6/__tests__/unit/elements/position.spec.ts b/packages/g6/__tests__/unit/elements/position.spec.ts index cda37956492..cc35dfbd77b 100644 --- a/packages/g6/__tests__/unit/elements/position.spec.ts +++ b/packages/g6/__tests__/unit/elements/position.spec.ts @@ -1,5 +1,5 @@ +import { elementPosition } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementPosition } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element position', () => { diff --git a/packages/g6/__tests__/unit/elements/state.spec.ts b/packages/g6/__tests__/unit/elements/state.spec.ts index 07b5fd2ac96..3da5c5b457c 100644 --- a/packages/g6/__tests__/unit/elements/state.spec.ts +++ b/packages/g6/__tests__/unit/elements/state.spec.ts @@ -1,5 +1,5 @@ +import { elementState } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementState } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element state', () => { diff --git a/packages/g6/__tests__/unit/elements/visibility.spec.ts b/packages/g6/__tests__/unit/elements/visibility.spec.ts index ad9243fb6c7..b1ac84f1acb 100644 --- a/packages/g6/__tests__/unit/elements/visibility.spec.ts +++ b/packages/g6/__tests__/unit/elements/visibility.spec.ts @@ -1,5 +1,5 @@ +import { elementVisibility } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { elementVisibility } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element visibility', () => { diff --git a/packages/g6/__tests__/unit/elements/z-index.spec.ts b/packages/g6/__tests__/unit/elements/z-index.spec.ts index 2f80efd07a9..2e95a65a02d 100644 --- a/packages/g6/__tests__/unit/elements/z-index.spec.ts +++ b/packages/g6/__tests__/unit/elements/z-index.spec.ts @@ -1,5 +1,5 @@ +import { elementZIndex } from '@/__tests__/demos'; import { CommonEvent, type Graph } from '@/src'; -import { elementZIndex } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('element zIndex', () => { diff --git a/packages/g6/__tests__/unit/layouts/circular.spec.ts b/packages/g6/__tests__/unit/layouts/circular.spec.ts index 245037ec9c6..00a526bc630 100644 --- a/packages/g6/__tests__/unit/layouts/circular.spec.ts +++ b/packages/g6/__tests__/unit/layouts/circular.spec.ts @@ -4,19 +4,19 @@ import { layoutCircularDegree, layoutCircularDivision, layoutCircularSpiral, -} from '@@/demo/case'; +} from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('layout circular', () => { it('layoutCircularBasic', async () => { const graph = await createDemoGraph(layoutCircularBasic); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-basic'); + await expect(graph).toMatchSnapshot(__filename, 'basic'); graph.destroy(); }); it('layoutCircularConfigurationTranslate', async () => { const graph = await createDemoGraph(layoutCircularConfigurationTranslate); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-configuration-translate'); + await expect(graph).toMatchSnapshot(__filename, 'configuration-translate'); graph.setLayout({ type: 'circular', @@ -28,25 +28,25 @@ describe('layout circular', () => { }), await graph.layout(); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-configuration-translate-division'); + await expect(graph).toMatchSnapshot(__filename, 'configuration-translate-division'); graph.destroy(); }); it('layoutCircularDegree', async () => { const graph = await createDemoGraph(layoutCircularDegree); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-degree'); + await expect(graph).toMatchSnapshot(__filename, 'degree'); graph.destroy(); }); it('layoutCircularDivision', async () => { const graph = await createDemoGraph(layoutCircularDivision); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-division'); + await expect(graph).toMatchSnapshot(__filename, 'division'); graph.destroy(); }); it('layoutCircularSpiral', async () => { const graph = await createDemoGraph(layoutCircularSpiral); - await expect(graph).toMatchSnapshot(__filename, 'layout-circular-spiral'); + await expect(graph).toMatchSnapshot(__filename, 'spiral'); graph.destroy(); }); }); diff --git a/packages/g6/__tests__/unit/layouts/combo-layout.spec.ts b/packages/g6/__tests__/unit/layouts/combo-layout.spec.ts index 7d8afab55b9..dd3a224991d 100644 --- a/packages/g6/__tests__/unit/layouts/combo-layout.spec.ts +++ b/packages/g6/__tests__/unit/layouts/combo-layout.spec.ts @@ -1,4 +1,4 @@ -import { layoutComboCombined } from '@@/demo/case'; +import { layoutComboCombined } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('combo layout', () => { diff --git a/packages/g6/__tests__/unit/layouts/compact-box.spec.ts b/packages/g6/__tests__/unit/layouts/compact-box.spec.ts index 32209a76957..264f6f00142 100644 --- a/packages/g6/__tests__/unit/layouts/compact-box.spec.ts +++ b/packages/g6/__tests__/unit/layouts/compact-box.spec.ts @@ -1,4 +1,4 @@ -import { layoutCompactBoxBasic, layoutCompactBoxLeftAlign, layoutCompactBoxTopToBottom } from '@@/demo/case'; +import { layoutCompactBoxBasic, layoutCompactBoxLeftAlign, layoutCompactBoxTopToBottom } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('compact box', () => { diff --git a/packages/g6/__tests__/unit/layouts/layout-concentric.spec.ts b/packages/g6/__tests__/unit/layouts/concentric.spec.ts similarity index 61% rename from packages/g6/__tests__/unit/layouts/layout-concentric.spec.ts rename to packages/g6/__tests__/unit/layouts/concentric.spec.ts index a50e83b432f..8f6f14ba7ac 100644 --- a/packages/g6/__tests__/unit/layouts/layout-concentric.spec.ts +++ b/packages/g6/__tests__/unit/layouts/concentric.spec.ts @@ -1,10 +1,10 @@ -import { layoutConcentric } from '@@/demo/case'; +import { layoutConcentric } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('layout concentric', () => { it('render', async () => { const graph = await createDemoGraph(layoutConcentric); - await expect(graph).toMatchSnapshot(__filename, 'layout-concentric-basic'); + await expect(graph).toMatchSnapshot(__filename); graph.destroy(); }); diff --git a/packages/g6/__tests__/unit/layouts/d3-force.spec.ts b/packages/g6/__tests__/unit/layouts/d3-force.spec.ts new file mode 100644 index 00000000000..d38475ccc39 --- /dev/null +++ b/packages/g6/__tests__/unit/layouts/d3-force.spec.ts @@ -0,0 +1,11 @@ +import { layoutD3Force } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('layout d3 force', () => { + it('render', async () => { + const graph = await createDemoGraph(layoutD3Force); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/layouts/dagre.spec.ts b/packages/g6/__tests__/unit/layouts/dagre.spec.ts index d368bd66897..9f8ed3a0657 100644 --- a/packages/g6/__tests__/unit/layouts/dagre.spec.ts +++ b/packages/g6/__tests__/unit/layouts/dagre.spec.ts @@ -1,4 +1,4 @@ -import { layoutAntVDagreFlow, layoutAntVDagreFlowCombo, layoutDagre } from '@@/demo/case'; +import { layoutAntVDagreFlow, layoutAntVDagreFlowCombo, layoutDagre } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('antv dagre flow', () => { diff --git a/packages/g6/__tests__/unit/layouts/dendrogram.spec.ts b/packages/g6/__tests__/unit/layouts/dendrogram.spec.ts index 6746c671595..2c69d1d0ddf 100644 --- a/packages/g6/__tests__/unit/layouts/dendrogram.spec.ts +++ b/packages/g6/__tests__/unit/layouts/dendrogram.spec.ts @@ -1,4 +1,4 @@ -import { layoutDendrogramBasic, layoutDendrogramTb } from '@@/demo/case'; +import { layoutDendrogramBasic, layoutDendrogramTb } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('dendrogram', () => { diff --git a/packages/g6/__tests__/unit/layouts/fruchterman.spec.ts b/packages/g6/__tests__/unit/layouts/fruchterman.spec.ts index 084ccc21d62..1a325f05c8c 100644 --- a/packages/g6/__tests__/unit/layouts/fruchterman.spec.ts +++ b/packages/g6/__tests__/unit/layouts/fruchterman.spec.ts @@ -1,6 +1,6 @@ -import { layoutFruchtermanBasic, layoutFruchtermanCluster } from '@@/demo/case'; +import { layoutFruchtermanBasic, layoutFruchtermanCluster } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; -import { clear as clearMochRandom, mock as mockRandom } from 'jest-random-mock'; +import { clear as clearMockRandom, mock as mockRandom } from 'jest-random-mock'; describe('layout fruchterman', () => { beforeAll(() => { @@ -8,19 +8,19 @@ describe('layout fruchterman', () => { }); afterAll(() => { - clearMochRandom(); + clearMockRandom(); }); it('basic', async () => { const graph = await createDemoGraph(layoutFruchtermanBasic); - await expect(graph).toMatchSnapshot(__filename, 'layout-fruchterman-basic'); + await expect(graph).toMatchSnapshot(__filename, 'basic'); graph.destroy(); }); it('cluster', async () => { const graph = await createDemoGraph(layoutFruchtermanCluster); - await expect(graph).toMatchSnapshot(__filename, 'layout-fruchterman-cluster'); + await expect(graph).toMatchSnapshot(__filename, 'cluster'); graph.destroy(); }); }); diff --git a/packages/g6/__tests__/unit/layouts/grid.spec.ts b/packages/g6/__tests__/unit/layouts/grid.spec.ts index 6fd27cab361..7365fcd509d 100644 --- a/packages/g6/__tests__/unit/layouts/grid.spec.ts +++ b/packages/g6/__tests__/unit/layouts/grid.spec.ts @@ -1,5 +1,5 @@ +import { layoutGrid } from '@/__tests__/demos/layout-grid'; import type { Graph } from '@/src'; -import { layoutGrid } from '@@/demo/case/layout-grid'; import { createDemoGraph } from '@@/utils'; describe('grid', () => { @@ -14,11 +14,11 @@ describe('grid', () => { }); it('sortBy default', async () => { - await expect(graph).toMatchSnapshot(__filename, 'sortby_default'); + await expect(graph).toMatchSnapshot(__filename, 'sortby-default'); }); it('sortBy id', async () => { graph.setLayout({ type: 'grid', sortBy: 'id' }), await graph.layout(); - await expect(graph).toMatchSnapshot(__filename, 'sortby_id'); + await expect(graph).toMatchSnapshot(__filename, 'sortby-id'); }); }); diff --git a/packages/g6/__tests__/unit/layouts/indented.spec.ts b/packages/g6/__tests__/unit/layouts/indented.spec.ts new file mode 100644 index 00000000000..2c9821d7254 --- /dev/null +++ b/packages/g6/__tests__/unit/layouts/indented.spec.ts @@ -0,0 +1,11 @@ +import { layoutIndented } from '@/__tests__/demos'; +import { createDemoGraph } from '@@/utils'; + +describe('layout d3 force', () => { + it('render', async () => { + const graph = await createDemoGraph(layoutIndented); + await expect(graph).toMatchSnapshot(__filename); + + graph.destroy(); + }); +}); diff --git a/packages/g6/__tests__/unit/layouts/mds.spec.ts b/packages/g6/__tests__/unit/layouts/mds.spec.ts index 82ecc9c1015..2d3ae151e5f 100644 --- a/packages/g6/__tests__/unit/layouts/mds.spec.ts +++ b/packages/g6/__tests__/unit/layouts/mds.spec.ts @@ -1,5 +1,5 @@ +import { layoutMDS } from '@/__tests__/demos/layout-mds'; import type { Graph } from '@/src'; -import { layoutMDS } from '@@/demo/case/layout-mds'; import { createDemoGraph } from '@@/utils'; describe('mds', () => { diff --git a/packages/g6/__tests__/unit/layouts/mindmap.spec.ts b/packages/g6/__tests__/unit/layouts/mindmap.spec.ts index bb5afc58341..9d89d85e038 100644 --- a/packages/g6/__tests__/unit/layouts/mindmap.spec.ts +++ b/packages/g6/__tests__/unit/layouts/mindmap.spec.ts @@ -1,4 +1,4 @@ -import { layoutMindmapH, layoutMindmapHCustomSide, layoutMindmapHLeft, layoutMindmapHRight } from '@@/demo/case'; +import { layoutMindmapH, layoutMindmapHCustomSide, layoutMindmapHLeft, layoutMindmapHRight } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('mindmap', () => { diff --git a/packages/g6/__tests__/unit/layouts/radial-layout.spec.ts b/packages/g6/__tests__/unit/layouts/radial-layout.spec.ts index 36c6188e860..0cbd5e3bef3 100644 --- a/packages/g6/__tests__/unit/layouts/radial-layout.spec.ts +++ b/packages/g6/__tests__/unit/layouts/radial-layout.spec.ts @@ -4,7 +4,7 @@ import { layoutRadialPreventOverlap, layoutRadialPreventOverlapUnstrict, layoutRadialSort, -} from '@@/demo/case'; +} from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('radial layout', () => { diff --git a/packages/g6/__tests__/unit/plugins/plugin-contextmenu.spec.ts b/packages/g6/__tests__/unit/plugins/contextmenu.spec.ts similarity index 91% rename from packages/g6/__tests__/unit/plugins/plugin-contextmenu.spec.ts rename to packages/g6/__tests__/unit/plugins/contextmenu.spec.ts index 5c4452a00e0..c104a33ca1a 100644 --- a/packages/g6/__tests__/unit/plugins/plugin-contextmenu.spec.ts +++ b/packages/g6/__tests__/unit/plugins/contextmenu.spec.ts @@ -1,4 +1,4 @@ -import { pluginContextmenu } from '@@/demo/case'; +import { pluginContextmenu } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('plugin contextmenu', () => { diff --git a/packages/g6/__tests__/unit/plugins/plugin-grid-line.spec.ts b/packages/g6/__tests__/unit/plugins/grid-line.spec.ts similarity index 96% rename from packages/g6/__tests__/unit/plugins/plugin-grid-line.spec.ts rename to packages/g6/__tests__/unit/plugins/grid-line.spec.ts index 6bea5f43e77..eec01455fee 100644 --- a/packages/g6/__tests__/unit/plugins/plugin-grid-line.spec.ts +++ b/packages/g6/__tests__/unit/plugins/grid-line.spec.ts @@ -1,5 +1,5 @@ +import { pluginGridLine } from '@/__tests__/demos'; import type { Graph } from '@/src'; -import { pluginGridLine } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('plugin grid line', () => { diff --git a/packages/g6/__tests__/unit/plugins/toolbar/plugin-toolbar.spec.ts b/packages/g6/__tests__/unit/plugins/toolbar/plugin-toolbar.spec.ts index 82d960ac63b..1e68a934000 100644 --- a/packages/g6/__tests__/unit/plugins/toolbar/plugin-toolbar.spec.ts +++ b/packages/g6/__tests__/unit/plugins/toolbar/plugin-toolbar.spec.ts @@ -1,4 +1,4 @@ -import { pluginToolbarBuildIn } from '@@/demo/case'; +import { pluginToolbarBuildIn } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; import { get } from '@antv/util'; @@ -14,7 +14,7 @@ describe('plugin toolbar', () => { expect(el.querySelectorAll('.g6-toolbar-item').length).toBe(9); - await graph.destroy(); + graph.destroy(); expect(container.querySelector('.g6-toolbar-item')).toBeFalsy(); }); }); diff --git a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts index 1340b5701aa..0376ba9edeb 100644 --- a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts +++ b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts @@ -1,4 +1,4 @@ -import { pluginTooltip } from '@@/demo/case'; +import { pluginTooltip } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('plugin tooltip', () => { diff --git a/packages/g6/__tests__/unit/plugins/plugin-watermark.spec.ts b/packages/g6/__tests__/unit/plugins/watermark.spec.ts similarity index 93% rename from packages/g6/__tests__/unit/plugins/plugin-watermark.spec.ts rename to packages/g6/__tests__/unit/plugins/watermark.spec.ts index 35ddead2a18..6c21a47c4d1 100644 --- a/packages/g6/__tests__/unit/plugins/plugin-watermark.spec.ts +++ b/packages/g6/__tests__/unit/plugins/watermark.spec.ts @@ -1,4 +1,4 @@ -import { pluginWatermark, pluginWatermarkImage } from '@@/demo/case'; +import { pluginWatermark, pluginWatermarkImage } from '@/__tests__/demos'; import { createDemoGraph } from '@@/utils'; describe('plugin watermark', () => { diff --git a/packages/g6/__tests__/unit/registry.spec.ts b/packages/g6/__tests__/unit/registry.spec.ts index 31928c94a2b..e43333a1db7 100644 --- a/packages/g6/__tests__/unit/registry.spec.ts +++ b/packages/g6/__tests__/unit/registry.spec.ts @@ -1,3 +1,4 @@ +import { getExtension, getExtensions, register } from '@/src'; import { Circle, CircleCombo, @@ -15,10 +16,9 @@ import { Star, Triangle, } from '@/src/elements'; -import { getExtension, getExtensions, register } from '@/src/registry'; +import { RectCombo } from '@/src/elements/combos/rect'; import { dark, light } from '@/src/themes'; import { pick } from '@antv/util'; -import { RectCombo } from '../../src/elements/combos/rect'; describe('registry', () => { it('registerBuiltInPlugins', () => { diff --git a/packages/g6/__tests__/unit/runtime/data.spec.ts b/packages/g6/__tests__/unit/runtime/data.spec.ts index 595a715e812..2e097ee8158 100644 --- a/packages/g6/__tests__/unit/runtime/data.spec.ts +++ b/packages/g6/__tests__/unit/runtime/data.spec.ts @@ -1,9 +1,9 @@ import { Utils } from '@/src'; import { DataController } from '@/src/runtime/data'; import { reduceDataChanges } from '@/src/utils/change'; +import { idOf } from '@/src/utils/id'; import tree from '@@/dataset/algorithm-category.json'; import { clone } from '@antv/util'; -import { idOf } from '../../../src/utils/id'; const data = { nodes: [ diff --git a/packages/g6/__tests__/unit/runtime/element.spec.ts b/packages/g6/__tests__/unit/runtime/element.spec.ts index 12276870b4e..6f10fbd71d0 100644 --- a/packages/g6/__tests__/unit/runtime/element.spec.ts +++ b/packages/g6/__tests__/unit/runtime/element.spec.ts @@ -2,15 +2,65 @@ import { Graph } from '@/src'; import * as BUILT_IN_PALETTES from '@/src/palettes'; import { light as LIGHT_THEME } from '@/src/themes'; import { idOf } from '@/src/utils/id'; -import { graphElement } from '@@/demo/static/graph-element'; -import { createDemoGraph } from '@@/utils'; +import { createGraph } from '@@/utils'; import { omit } from '@antv/util'; describe('ElementController', () => { let graph: Graph; beforeAll(async () => { - graph = await createDemoGraph(graphElement); + graph = await createGraph({ + data: { + nodes: [ + { id: 'node-1', style: { x: 100, y: 100, fill: 'red', stroke: 'pink', lineWidth: 1 }, data: { value: 100 } }, + { id: 'node-2', style: { x: 150, y: 100 }, data: { value: 150 } }, + { id: 'node-3', style: { x: 125, y: 150, parentId: 'combo-1', states: ['selected'] }, data: { value: 150 } }, + ], + edges: [ + { id: 'edge-1', source: 'node-1', target: 'node-2', data: { weight: 250 } }, + { + id: 'edge-2', + source: 'node-2', + target: 'node-3', + style: { lineWidth: 5, states: ['active', 'selected'] }, + data: { weight: 300 }, + }, + ], + combos: [{ id: 'combo-1' }], + }, + node: { + style: { + fill: (datum) => ((datum?.data?.value as number) > 100 ? 'red' : 'blue'), + border: (datum: any, index: number) => (index % 2 === 0 ? 0 : 10), + }, + state: { + selected: { + fill: (datum) => ((datum?.data?.value as number) > 100 ? 'purple' : 'cyan'), + }, + }, + palette: 'spectral', + }, + edge: { + style: {}, + state: { + selected: { + stroke: 'red', + }, + active: { + stroke: 'pink', + lineWidth: 4, + }, + }, + palette: { type: 'group', color: 'oranges', field: (d) => idOf(d).toString(), invert: true }, + }, + combo: { + style: {}, + state: {}, + palette: 'blues', + }, + }); + + await graph.render(); }); afterAll(() => { diff --git a/packages/g6/__tests__/unit/runtime/element/visibility.spec.ts b/packages/g6/__tests__/unit/runtime/element/visibility.spec.ts index db2d1f40cf1..22327e772a0 100644 --- a/packages/g6/__tests__/unit/runtime/element/visibility.spec.ts +++ b/packages/g6/__tests__/unit/runtime/element/visibility.spec.ts @@ -1,12 +1,32 @@ import type { Graph } from '@/src'; -import { controllerElementVisibility } from '@@/demo/static/controller-element-visibility'; -import { createDemoGraph } from '@@/utils'; +import { createGraph } from '@@/utils'; describe('element visibility', () => { let graph: Graph; beforeAll(async () => { - graph = await createDemoGraph(controllerElementVisibility); + graph = await createGraph({ + data: { + nodes: [ + { id: 'node-1', style: { x: 50, y: 50 } }, + { id: 'node-2', style: { x: 200, y: 50 } }, + { id: 'node-3', style: { x: 125, y: 150, opacity: 0.5 } }, + ], + edges: [ + { source: 'node-1', target: 'node-2' }, + { source: 'node-2', target: 'node-3', style: { opacity: 0.5 } }, + { source: 'node-3', target: 'node-1' }, + ], + }, + theme: 'light', + node: { + style: { + size: 20, + }, + }, + }); + + await graph.render(); }); afterAll(() => { diff --git a/packages/g6/__tests__/unit/runtime/element/z-index.spec.ts b/packages/g6/__tests__/unit/runtime/element/z-index.spec.ts index faa6a7b4122..047f7dee162 100644 --- a/packages/g6/__tests__/unit/runtime/element/z-index.spec.ts +++ b/packages/g6/__tests__/unit/runtime/element/z-index.spec.ts @@ -1,12 +1,27 @@ import type { Graph } from '@/src'; -import { controllerElementZIndex } from '@@/demo/static/controller-element-z-index'; -import { createDemoGraph } from '@@/utils'; +import { createGraph } from '@@/utils'; describe('element z-index', () => { let graph: Graph; beforeAll(async () => { - graph = await createDemoGraph(controllerElementZIndex); + graph = await createGraph({ + data: { + nodes: [ + { id: 'node-1', style: { x: 150, y: 150, color: 'red' } }, + { id: 'node-2', style: { x: 175, y: 175, color: 'green' } }, + { id: 'node-3', style: { x: 200, y: 200, color: 'blue' } }, + ], + }, + theme: 'light', + node: { + style: { + size: 50, + }, + }, + }); + + await graph.render(); }); afterAll(() => { diff --git a/packages/g6/__tests__/unit/runtime/graph/graph.spec.ts b/packages/g6/__tests__/unit/runtime/graph/graph.spec.ts index bd5081f5fb6..735bd8f6e82 100644 --- a/packages/g6/__tests__/unit/runtime/graph/graph.spec.ts +++ b/packages/g6/__tests__/unit/runtime/graph/graph.spec.ts @@ -1,6 +1,6 @@ +import { commonGraph } from '@/__tests__/demos/common-graph'; import { Graph } from '@/src'; import data from '@@/dataset/cluster.json'; -import { commonGraph } from '@@/demo/case/common-graph'; import { createDemoGraph } from '@@/utils'; describe('Graph', () => { diff --git a/packages/g6/__tests__/unit/runtime/viewport.spec.ts b/packages/g6/__tests__/unit/runtime/viewport.spec.ts index f251211a791..0043cb91c35 100644 --- a/packages/g6/__tests__/unit/runtime/viewport.spec.ts +++ b/packages/g6/__tests__/unit/runtime/viewport.spec.ts @@ -1,6 +1,6 @@ +import { controllerViewport } from '@/__tests__/demos/controller-viewport'; +import { viewportFit } from '@/__tests__/demos/viewport-fit'; import { Graph } from '@/src'; -import { viewportFit } from '@@/demo/case/viewport-fit'; -import { controllerViewport } from '@@/demo/static/controller-viewport'; import { createDemoGraph } from '@@/utils'; import { AABB } from '@antv/g'; diff --git a/packages/g6/__tests__/unit/spec/theme.spec.ts b/packages/g6/__tests__/unit/spec/theme.spec.ts index 94f840dd055..3b4b5fca81f 100644 --- a/packages/g6/__tests__/unit/spec/theme.spec.ts +++ b/packages/g6/__tests__/unit/spec/theme.spec.ts @@ -1,5 +1,5 @@ +import { theme } from '@/__tests__/demos'; import type { Graph, ThemeOptions } from '@/src'; -import { theme } from '@@/demo/case'; import { createDemoGraph } from '@@/utils'; describe('spec theme', () => { diff --git a/packages/g6/__tests__/unit/utils/element.spec.ts b/packages/g6/__tests__/unit/utils/element.spec.ts index 028e727f4c4..11538ff468b 100644 --- a/packages/g6/__tests__/unit/utils/element.spec.ts +++ b/packages/g6/__tests__/unit/utils/element.spec.ts @@ -1,5 +1,6 @@ import { Polyline } from '@/src/elements/edges'; import { Circle } from '@/src/elements/nodes'; +import { PortStyleProps } from '@/src/types'; import { findPorts, getAllPorts, @@ -21,7 +22,6 @@ import { } from '@/src/utils/element'; import { getXYByPlacement } from '@/src/utils/position'; import { AABB, DisplayObject, Line, Rect } from '@antv/g'; -import { PortStyleProps } from '../../../src/types'; describe('element', () => { const bbox = new AABB(); diff --git a/packages/g6/__tests__/unit/utils/palette.spec.ts b/packages/g6/__tests__/unit/utils/palette.spec.ts index 8f2bb1634ee..3210ccdb930 100644 --- a/packages/g6/__tests__/unit/utils/palette.spec.ts +++ b/packages/g6/__tests__/unit/utils/palette.spec.ts @@ -1,4 +1,4 @@ -import { register } from '@/src/registry'; +import { register } from '@/src'; import { idOf } from '@/src/utils/id'; import { assignColorByPalette, getPaletteColors, parsePalette } from '@/src/utils/palette'; diff --git a/packages/g6/__tests__/unit/utils/point.spec.ts b/packages/g6/__tests__/unit/utils/point.spec.ts index 7f691caa19c..a0202701d3c 100644 --- a/packages/g6/__tests__/unit/utils/point.spec.ts +++ b/packages/g6/__tests__/unit/utils/point.spec.ts @@ -1,3 +1,4 @@ +import { getDiamondPoints } from '@/src/utils/element'; import { findNearestPoints, getEllipseIntersectPoint, @@ -15,7 +16,6 @@ import { toPointObject, } from '@/src/utils/point'; import { Circle, Rect } from '@antv/g'; -import { getDiamondPoints } from '../../../src/utils/element'; describe('Point Functions', () => { it('parsePoint', () => { diff --git a/packages/g6/__tests__/unit/utils/relation.spec.ts b/packages/g6/__tests__/unit/utils/relation.spec.ts index 0f7b781b1fb..5816f1cab97 100644 --- a/packages/g6/__tests__/unit/utils/relation.spec.ts +++ b/packages/g6/__tests__/unit/utils/relation.spec.ts @@ -1,28 +1,37 @@ +import { Graph } from '@/src'; import { getElementNthDegreeIds, getNodeNthDegreeIds } from '@/src/utils/relation'; -import { Graph } from '../../../src'; describe('relation', () => { - const graph = new Graph({ - data: { - nodes: [ - { id: '1', style: { parentId: 'combo1' } }, - { id: '2' }, - { id: '3' }, - { id: '4' }, - { id: '5' }, - { id: '6' }, - ], - edges: [ - { source: '1', target: '2' }, - { source: '1', target: '3' }, - { source: '2', target: '4' }, - { source: '3', target: '5' }, - { source: '5', target: '6' }, - { source: 'combo1', target: '6' }, - ], - combos: [{ id: 'combo1' }], - }, + let graph: Graph; + + beforeAll(() => { + graph = new Graph({ + data: { + nodes: [ + { id: '1', style: { parentId: 'combo1' } }, + { id: '2' }, + { id: '3' }, + { id: '4' }, + { id: '5' }, + { id: '6' }, + ], + edges: [ + { source: '1', target: '2' }, + { source: '1', target: '3' }, + { source: '2', target: '4' }, + { source: '3', target: '5' }, + { source: '5', target: '6' }, + { source: 'combo1', target: '6' }, + ], + combos: [{ id: 'combo1' }], + }, + }); + }); + + afterAll(() => { + graph.destroy(); }); + it('getElementNthDegreeIds', () => { expect(getElementNthDegreeIds(graph, 'node', '1', 0)).toEqual(['1']); expect(getElementNthDegreeIds(graph, 'node', '1', 1)).toEqual(['1', '1-2', '1-3', '2', '3']); diff --git a/packages/g6/__tests__/unit/utils/shortcut.spec.ts b/packages/g6/__tests__/unit/utils/shortcut.spec.ts index 585316b570c..edd7a04f148 100644 --- a/packages/g6/__tests__/unit/utils/shortcut.spec.ts +++ b/packages/g6/__tests__/unit/utils/shortcut.spec.ts @@ -7,6 +7,10 @@ describe('shortcut', () => { const shortcut = new Shortcut(emitter); + afterAll(() => { + emitter.off(); + }); + it('bind and unbind', () => { const controlEqual = jest.fn(); const controlMinus = jest.fn(); diff --git a/packages/g6/__tests__/unit/utils/visibility.spec.ts b/packages/g6/__tests__/unit/utils/visibility.spec.ts index 69d9845c27d..f85b3b2e9ef 100644 --- a/packages/g6/__tests__/unit/utils/visibility.spec.ts +++ b/packages/g6/__tests__/unit/utils/visibility.spec.ts @@ -1,4 +1,4 @@ -import { BaseShape } from '@/src/elements/shapes/base-shape'; +import { BaseShape } from '@/src'; import { Circle } from '@antv/g'; class Shape extends BaseShape<{ visibility: 'visible' | 'hidden' }> { diff --git a/packages/g6/__tests__/utils/create.ts b/packages/g6/__tests__/utils/create.ts index 79ac6526c4e..3507c5bbeb8 100644 --- a/packages/g6/__tests__/utils/create.ts +++ b/packages/g6/__tests__/utils/create.ts @@ -1,3 +1,4 @@ +import type { G6Spec } from '@/src'; import { Graph } from '@/src'; import { Circle } from '@/src/elements'; import { Canvas } from '@/src/runtime/canvas'; @@ -9,7 +10,6 @@ import { Plugin as Plugin3D } from '@antv/g-plugin-3d'; import { Plugin as PluginControl } from '@antv/g-plugin-control'; import { Renderer as SVGRenderer } from '@antv/g-svg'; import { Renderer as WebGLRenderer } from '@antv/g-webgl'; -import type { STDTestCase, STDTestCaseContext } from '../demo/types'; import { OffscreenCanvasContext } from './offscreen-canvas-context'; function getRenderer(renderer: string) { @@ -86,7 +86,17 @@ export function createEdgeNode(point: Point): Node { }); } -export async function createDemoGraph(demo: STDTestCase, context?: Partial): Promise { +export async function createDemoGraph(demo: TestCase, context?: Partial): Promise { const container = createGraphCanvas(document.getElementById('container')); return demo({ animation: false, container, theme: 'light', ...context }); } + +export async function createGraph(options: G6Spec) { + const container = createGraphCanvas(document.getElementById('container')); + return new Graph({ + container, + animation: false, + theme: 'light', + ...options, + }); +} diff --git a/packages/g6/__tests__/utils/get-cases.ts b/packages/g6/__tests__/utils/get-cases.ts deleted file mode 100644 index d00231dd177..00000000000 --- a/packages/g6/__tests__/utils/get-cases.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { BaseTestCase } from '../demo/types'; - -export function getCases(module: Record) { - const cases = Object.entries(module); - const only = cases.filter(([, { only = false }]) => only); - if (only.length !== 0 && process.env.CI === 'true') throw new Error('Cannot run only tests in CI'); - return (only.length !== 0 ? only : cases) - .filter(([, { skip = false }]) => !skip) - .map(([name, testCase]) => [kebabCase(name), testCase] as [string, T]); -} - -const kebabCase = (str: string) => str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`); diff --git a/packages/g6/__tests__/utils/index.ts b/packages/g6/__tests__/utils/index.ts index 6edc626548a..d21dfbe396e 100644 --- a/packages/g6/__tests__/utils/index.ts +++ b/packages/g6/__tests__/utils/index.ts @@ -1,4 +1,3 @@ -export { createDemoGraph, createEdgeNode, createGraphCanvas } from './create'; -export { getCases } from './get-cases'; +export { createDemoGraph, createEdgeNode, createGraph, createGraphCanvas } from './create'; export { createDeterministicRandom } from './random'; export { sleep } from './sleep'; diff --git a/packages/g6/__tests__/utils/to-match-svg-snapshot.ts b/packages/g6/__tests__/utils/to-match-svg-snapshot.ts index 6123698aa7b..f10ca0c3677 100644 --- a/packages/g6/__tests__/utils/to-match-svg-snapshot.ts +++ b/packages/g6/__tests__/utils/to-match-svg-snapshot.ts @@ -1,8 +1,9 @@ import type { Graph } from '@/src'; -import { Canvas } from '@antv/g'; +import type { AnimateEvent } from '@/src/utils/event'; +import type { Canvas, IAnimation } from '@antv/g'; import * as fs from 'fs'; import * as path from 'path'; -import { format } from 'prettier'; +import format from 'xml-formatter'; import xmlserializer from 'xmlserializer'; import { getSnapshotDir } from './dir'; import { sleep } from './sleep'; @@ -46,16 +47,8 @@ export async function toMatchSVGSnapshot( }); actual += svg - ? formatSVG( - await format(xmlserializer.serializeToString(svg as any), { - parser: 'babel', - }), - keepSVGElementId, - ) - : 'null'; - - // Remove ';' after format by babel. - if (actual !== 'null') actual = actual.slice(0, -2); + ? formatSVG(format(xmlserializer.serializeToString(svg as any), { indentation: ' ' }), keepSVGElementId) + : ''; try { if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true }); @@ -105,3 +98,43 @@ export async function toMatchSnapshot( ) { return await toMatchSVGSnapshot(Object.values(graph.getCanvas().canvas), ...getSnapshotDir(dir, detail), options); } + +export async function toMatchAnimation( + graph: Graph, + dir: string, + frames: number[], + operation: () => void | Promise, + detail = 'default', + options: ToMatchSVGSnapshotOptions = {}, +) { + const animationPromise = new Promise((resolve) => { + graph.once('beforeanimate', (e: AnimateEvent) => { + resolve(e.animation!); + }); + }); + + await operation(); + + const animation = await animationPromise; + + animation.pause(); + + for (const frame of frames) { + animation.currentTime = frame; + await sleep(32); + const result = await toMatchSVGSnapshot( + Object.values(graph.getCanvas().canvas), + ...getSnapshotDir(dir, `${detail}-${frame}`), + options, + ); + + if (!result.pass) { + return result; + } + } + + return { + message: () => `match ${detail}`, + pass: true, + }; +} diff --git a/packages/g6/__tests__/utils/use-snapshot-matchers.ts b/packages/g6/__tests__/utils/use-snapshot-matchers.ts index 806b6a24971..dc4a5d590d1 100644 --- a/packages/g6/__tests__/utils/use-snapshot-matchers.ts +++ b/packages/g6/__tests__/utils/use-snapshot-matchers.ts @@ -1,4 +1,9 @@ -import { ToMatchSVGSnapshotOptions, toMatchSVGSnapshot, toMatchSnapshot } from './to-match-svg-snapshot'; +import { + ToMatchSVGSnapshotOptions, + toMatchAnimation, + toMatchSVGSnapshot, + toMatchSnapshot, +} from './to-match-svg-snapshot'; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace @@ -6,6 +11,13 @@ declare global { interface Matchers { toMatchSVGSnapshot(dir: string, name: string, options?: ToMatchSVGSnapshotOptions): Promise; toMatchSnapshot(dir: string, detail?: string, options?: ToMatchSVGSnapshotOptions): Promise; + toMatchAnimation( + dir: string, + frames: number[], + operation: () => void | Promise, + detail?: string, + options?: ToMatchSVGSnapshotOptions, + ): Promise; } } } @@ -13,4 +25,5 @@ declare global { expect.extend({ toMatchSVGSnapshot, toMatchSnapshot, + toMatchAnimation, }); diff --git a/packages/g6/jest.config.js b/packages/g6/jest.config.js index b3e293e0059..3b30b42ad47 100644 --- a/packages/g6/jest.config.js +++ b/packages/g6/jest.config.js @@ -4,23 +4,10 @@ const esm = ['internmap', 'd3-*', 'lodash-es'].map((d) => `_${d}|${d}`).join('|' module.exports = { testTimeout: 100000, - preset: 'ts-jest/presets/js-with-ts', testEnvironment: 'jsdom', setupFilesAfterEnv: ['./__tests__/setup.ts'], transform: { - '^.+\\.[tj]s$': [ - 'ts-jest', - { - diagnostics: { - exclude: ['**'], - }, - tsconfig: { - allowJs: true, - target: 'esnext', - esModuleInterop: true, - }, - }, - ], + '^.+\\.[tj]s$': ['@swc/jest'], }, collectCoverageFrom: ['src/**/*.ts'], moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], diff --git a/packages/g6/src/preset.ts b/packages/g6/src/preset.ts index 2bb57837745..2b2bcdb0569 100644 --- a/packages/g6/src/preset.ts +++ b/packages/g6/src/preset.ts @@ -1,9 +1,5 @@ import { runtime } from '@antv/g'; import { registerBuiltInExtensions } from './registry'; -const onload = () => { - runtime.enableCSSParsing = false; - registerBuiltInExtensions(); -}; - -onload(); +runtime.enableCSSParsing = false; +registerBuiltInExtensions(); diff --git a/packages/g6/src/runtime/canvas.ts b/packages/g6/src/runtime/canvas.ts index 804e3a94240..e4dbf325448 100644 --- a/packages/g6/src/runtime/canvas.ts +++ b/packages/g6/src/runtime/canvas.ts @@ -3,6 +3,7 @@ import type { DataURLOptions, DisplayObject, CanvasConfig as GCanvasConfig, + IAnimation, IRenderer, PointLike, } from '@antv/g'; @@ -263,9 +264,46 @@ export class Canvas { camera.cancelLandmarkAnimation(); } - canvas.destroy(); + destroyCanvas(canvas); // @ts-expect-error force delete this[name] = undefined; }); } } + +/** + * G Canvas destroy 未处理动画对象,导致内存泄漏 + * + * G Canvas destroy does not handle animation objects, causing memory leaks + * @param canvas GCanvas + * @description + * 这些操作都应该在 G 中完成,这里只是一个临时的解决方案 + * 此操作大概能在测试环节降低 10~20% 的内存占用(从 2800MB 降低到 2200MB) + * + * These operations should be completed in G, this is just a temporary solution + * This operation can reduce memory usage by 10-20% in the test environment (from 2800MB to 2200MB) + */ +function destroyCanvas(canvas: GCanvas) { + canvas.destroy(); + + // 移除相机事件 / Remove camera events + const camera = canvas.getCamera(); + camera.eventEmitter.removeAllListeners(); + + canvas.document.timeline.destroy(); + // @ts-expect-error private property + const { animationsWithPromises } = canvas.document.timeline; + // 释放 target 对象图形 / Release target object graphics + animationsWithPromises.forEach((animation: IAnimation) => { + if (animation.effect.target) animation.effect.target = null; + // @ts-expect-error private property + if (animation.effect.computedTiming) animation.effect.computedTiming = null; + }); + + // @ts-expect-error private property + canvas.document.timeline.animationsWithPromises = []; + // @ts-expect-error private property + canvas.document.timeline.rafCallbacks = []; + // @ts-expect-error private property + canvas.document.timeline = null; +} diff --git a/packages/g6/src/runtime/graph.ts b/packages/g6/src/runtime/graph.ts index 25b79a9a2cc..206f910c213 100644 --- a/packages/g6/src/runtime/graph.ts +++ b/packages/g6/src/runtime/graph.ts @@ -18,8 +18,8 @@ import type { PluginOptions, ThemeOptions, } from '../spec'; -import { UpdateBehaviorOption } from '../spec/behavior'; -import { UpdatePluginOption } from '../spec/plugin'; +import type { UpdateBehaviorOption } from '../spec/behavior'; +import type { UpdatePluginOption } from '../spec/plugin'; import type { CallableValue, DataID, diff --git a/packages/g6/src/utils/bbox.ts b/packages/g6/src/utils/bbox.ts index 37491cd523b..d113f53344c 100644 --- a/packages/g6/src/utils/bbox.ts +++ b/packages/g6/src/utils/bbox.ts @@ -1,6 +1,6 @@ import { AABB } from '@antv/g'; import { clone } from '@antv/util'; -import { TriangleDirection } from '../elements/nodes/triangle'; +import type { TriangleDirection } from '../elements/nodes/triangle'; import type { Node, Padding, Point } from '../types'; import { isPoint } from './is'; import { isBetween } from './math'; diff --git a/packages/g6/src/utils/element.ts b/packages/g6/src/utils/element.ts index c2e340ede61..1404180f94e 100644 --- a/packages/g6/src/utils/element.ts +++ b/packages/g6/src/utils/element.ts @@ -1,7 +1,7 @@ import type { AABB, DisplayObject, TextStyleProps } from '@antv/g'; import { get, isString } from '@antv/util'; import { BaseCombo, BaseEdge, BaseNode } from '../elements'; -import { NodePortStyleProps } from '../elements/nodes/base-node'; +import type { NodePortStyleProps } from '../elements/nodes/base-node'; import type { TriangleDirection } from '../elements/nodes/triangle'; import type { Combo, Edge, Node, Placement, Point, Position } from '../types'; import type { LabelPlacement, Port } from '../types/node';