From 78e483b065dcf07355d2d6d9da5a4c4ba7112ff4 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 21 Jun 2024 21:03:25 +0800 Subject: [PATCH 1/2] chore: update graphlib version --- packages/g6/package.json | 2 +- packages/site/.dumi/global.ts | 1 - packages/site/package.json | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/g6/package.json b/packages/g6/package.json index a2b589b817f..6ab2caecffa 100644 --- a/packages/g6/package.json +++ b/packages/g6/package.json @@ -59,7 +59,7 @@ "@antv/g": "^6.0.6", "@antv/g-canvas": "^2.0.7", "@antv/g-plugin-dragndrop": "^2.0.5", - "@antv/graphlib": "^2.0.2", + "@antv/graphlib": "^2.0.3", "@antv/hierarchy": "^0.6.12", "@antv/layout": "^1.2.14-beta.4", "@antv/util": "^3.3.7", diff --git a/packages/site/.dumi/global.ts b/packages/site/.dumi/global.ts index a6360b9d3bb..cbe5b2c017b 100644 --- a/packages/site/.dumi/global.ts +++ b/packages/site/.dumi/global.ts @@ -7,7 +7,6 @@ if (window) { window.layoutGpu = require('@antv/layout-gpu'); window.algorithm = require('@antv/algorithm'); window.layoutWasm = require('@antv/layout-wasm'); - window.graphlib = require('@antv/graphlib'); window.insertCss = require('insert-css'); window.util = require('@antv/util'); diff --git a/packages/site/package.json b/packages/site/package.json index 2270f6deca4..34c9484aaed 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -48,7 +48,6 @@ "@antv/g6": "workspace:*", "@antv/g6-extension-3d": "workspace:*", "@antv/g6-extension-react": "workspace:*", - "@antv/graphlib": "^2.0.2", "@antv/layout": "^1.2.14-beta.4", "@antv/layout-gpu": "^1.1.5", "@antv/layout-wasm": "^1.4.0", From 6a0ab73fac76b4561a36343cda9ca81308d944d6 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 21 Jun 2024 21:03:44 +0800 Subject: [PATCH 2/2] refactor: adjust demo and comment --- packages/g6/__tests__/demos/layout-compact-box-basic.ts | 2 +- packages/g6/src/runtime/graph.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/g6/__tests__/demos/layout-compact-box-basic.ts b/packages/g6/__tests__/demos/layout-compact-box-basic.ts index 4a827a9aede..12ad9569d16 100644 --- a/packages/g6/__tests__/demos/layout-compact-box-basic.ts +++ b/packages/g6/__tests__/demos/layout-compact-box-basic.ts @@ -6,7 +6,7 @@ export const layoutCompactBoxBasic: TestCase = async (context) => { ...context, autoFit: 'view', data: treeToGraphData(data), - behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], + behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'], node: { style: { labelText: (data) => data.id, diff --git a/packages/g6/src/runtime/graph.ts b/packages/g6/src/runtime/graph.ts index 43bda5afb76..bf3bfb1a497 100644 --- a/packages/g6/src/runtime/graph.ts +++ b/packages/g6/src/runtime/graph.ts @@ -186,7 +186,7 @@ export class Graph extends EventEmitter { } /** - * 获取当前图的缩放区间 + * 设置当前图的缩放区间 * * Get the zoom range of the current graph * @param zoomRange - 缩放区间 | zoom range