diff --git a/package.json b/package.json index 149167c676b..16b7da95667 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ ] }, "devDependencies": { - "@antv/g-canvas": "^2.0.20", - "@antv/g-plugin-rough-canvas-renderer": "^2.0.20", + "@antv/g-canvas": "^2.0.22", + "@antv/g-plugin-rough-canvas-renderer": "^2.0.22", "@babel/core": "^7.26.0", "@babel/plugin-transform-typescript": "^7.25.9", "@changesets/cli": "^2.27.9", @@ -43,12 +43,12 @@ "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", - "@swc/core": "^1.7.42", + "@swc/core": "^1.8.0", "@swc/jest": "^0.2.37", "@types/d3-hierarchy": "^3.1.7", "@types/jest": "^29.5.14", "@types/jsdom": "^21.1.7", - "@types/node": "^20.17.5", + "@types/node": "^20.17.6", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "chalk": "^4.1.2", @@ -69,7 +69,7 @@ "prettier-plugin-organize-imports": "^3.2.4", "prettier-plugin-packagejson": "^2.5.3", "rimraf": "^5.0.10", - "rollup": "^4.24.3", + "rollup": "^4.24.4", "rollup-plugin-polyfill-node": "^0.13.0", "rollup-plugin-visualizer": "^5.12.0", "stats.js": "^0.17.0", diff --git a/packages/g6-extension-3d/package.json b/packages/g6-extension-3d/package.json index 9b7602e192a..b22917f7484 100644 --- a/packages/g6-extension-3d/package.json +++ b/packages/g6-extension-3d/package.json @@ -34,16 +34,16 @@ }, "dependencies": { "@antv/g-device-api": "^1.6.13", - "@antv/g-plugin-3d": "^2.0.22", - "@antv/g-plugin-device-renderer": "^2.1.4", - "@antv/g-plugin-dragndrop": "^2.0.15", - "@antv/g-webgl": "^2.0.24", + "@antv/g-plugin-3d": "^2.0.24", + "@antv/g-plugin-device-renderer": "^2.2.1", + "@antv/g-plugin-dragndrop": "^2.0.17", + "@antv/g-webgl": "^2.0.26", "@antv/layout": "1.2.14-beta.8", "@antv/util": "^3.3.10" }, "devDependencies": { - "@antv/g": "^6.1.4", - "@antv/g-canvas": "^2.0.20", + "@antv/g": "^6.1.6", + "@antv/g-canvas": "^2.0.22", "@antv/g6": "workspace:*" }, "peerDependencies": { diff --git a/packages/g6-extension-react/__tests__/demos/performance-diagnosis.tsx b/packages/g6-extension-react/__tests__/demos/performance-diagnosis.tsx index ef32476cdb5..8a3b9e40325 100644 --- a/packages/g6-extension-react/__tests__/demos/performance-diagnosis.tsx +++ b/packages/g6-extension-react/__tests__/demos/performance-diagnosis.tsx @@ -91,10 +91,10 @@ export const PerformanceDiagnosis = () => { }; const size = { - 'pre-inspection': [240, 80], - problem: [200, 80], + 'pre-inspection': [240, 120], + problem: [200, 120], inspection: [330, 100], - solution: [240, 60], + solution: [200, 120], }[d.data!.type as string] || [200, 80]; Object.assign(style, { @@ -144,9 +144,6 @@ export const PerformanceDiagnosis = () => { }, layout: { type: 'antv-dagre', - nodeSize: [200, 40], - nodesep: 70, - ranksep: 5, }, behaviors: ['zoom-canvas', 'drag-canvas', 'hover-element', 'click-select'], }; diff --git a/packages/g6-extension-react/package.json b/packages/g6-extension-react/package.json index becfa662723..741dea07e0a 100644 --- a/packages/g6-extension-react/package.json +++ b/packages/g6-extension-react/package.json @@ -35,9 +35,9 @@ "type-check": "tsc --noEmit -p tsconfig.test.json" }, "dependencies": { - "@antv/g": "^6.1.4", - "@antv/g-svg": "^2.0.17", - "@antv/react-g": "^2.0.20" + "@antv/g": "^6.1.6", + "@antv/g-svg": "^2.0.19", + "@antv/react-g": "^2.0.22" }, "devDependencies": { "@ant-design/icons": "^5.5.1", diff --git a/packages/g6-ssr/package.json b/packages/g6-ssr/package.json index c5f45a66b22..bff12bb814a 100644 --- a/packages/g6-ssr/package.json +++ b/packages/g6-ssr/package.json @@ -27,8 +27,8 @@ "type-check": "tsc --noEmit -p tsconfig.test.json" }, "dependencies": { - "@antv/g": "^6.1.4", - "@antv/g-canvas": "^2.0.20", + "@antv/g": "^6.1.6", + "@antv/g-canvas": "^2.0.22", "@antv/g6": "workspace:*", "cac": "^6.7.14", "canvas": "^2.11.2" diff --git a/packages/g6/__tests__/demos/case-org-chart.ts b/packages/g6/__tests__/demos/case-org-chart.ts index 4d1cf79da24..f671e6c9e4e 100644 --- a/packages/g6/__tests__/demos/case-org-chart.ts +++ b/packages/g6/__tests__/demos/case-org-chart.ts @@ -196,7 +196,6 @@ export const caseOrgChart: TestCase = async (context) => { }, layout: { type: 'dagre', - nodeSize: [150, 60], }, autoFit: 'view', behaviors: ['level-of-detail', 'zoom-canvas', 'drag-canvas'], diff --git a/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts b/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts index 146b0c2811e..f452316839d 100644 --- a/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts +++ b/packages/g6/__tests__/demos/layout-antv-dagre-flow.ts @@ -11,6 +11,7 @@ export const layoutAntVDagreFlow: TestCase = async (context) => { style: { size: [60, 30], radius: 8, + labelFill: '#fff', labelPlacement: 'center', labelText: (d) => d.id, }, @@ -26,9 +27,6 @@ export const layoutAntVDagreFlow: TestCase = async (context) => { }, layout: { type: 'antv-dagre', - nodesep: 100, - ranksep: 70, - controlPoints: true, }, behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas'], }); diff --git a/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-A-over-C.svg b/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-A-over-C.svg index 664441cbb5b..7bb64369de8 100644 --- a/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-A-over-C.svg +++ b/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-A-over-C.svg @@ -1,13 +1,13 @@ - + - + - + - + B @@ -15,7 +15,7 @@ - + @@ -30,9 +30,9 @@ - + - + @@ -40,9 +40,9 @@ - + - + @@ -50,9 +50,9 @@ - + - + @@ -60,9 +60,9 @@ - + - + @@ -70,9 +70,9 @@ - + - + @@ -80,9 +80,9 @@ - + - + @@ -90,9 +90,9 @@ - + - + @@ -100,9 +100,9 @@ - + - + @@ -110,9 +110,9 @@ - + - + @@ -120,9 +120,9 @@ - + - + @@ -130,9 +130,9 @@ - + - + @@ -140,14 +140,14 @@ - + - + - + @@ -159,7 +159,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -207,7 +207,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-C-over-A.svg b/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-C-over-A.svg index 2bd88dcaacd..21f3d50612e 100644 --- a/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-C-over-A.svg +++ b/packages/g6/__tests__/snapshots/bugs/behaviors-drag-element-combo/drag-combo-C-over-A.svg @@ -1,13 +1,13 @@ - + - + - + - + B @@ -18,9 +18,9 @@ - + - + @@ -28,9 +28,9 @@ - + - + @@ -38,9 +38,9 @@ - + - + @@ -48,9 +48,9 @@ - + - + @@ -58,9 +58,9 @@ - + - + @@ -68,9 +68,9 @@ - + - + @@ -78,9 +78,9 @@ - + - + @@ -88,9 +88,9 @@ - + - + @@ -98,9 +98,9 @@ - + - + @@ -108,9 +108,9 @@ - + - + @@ -118,9 +118,9 @@ - + - + @@ -128,14 +128,14 @@ - + - + - + @@ -147,7 +147,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -207,7 +207,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/dagre-RL.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/dagre-RL.svg index 1fa164557ca..46ba3a2c1df 100644 --- a/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/dagre-RL.svg +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/dagre-RL.svg @@ -1,14 +1,14 @@ - + - + - + @@ -16,9 +16,9 @@ - + - + @@ -26,9 +26,9 @@ - + - + @@ -36,9 +36,9 @@ - + - + @@ -46,9 +46,9 @@ - + - + @@ -56,9 +56,9 @@ - + - + @@ -66,9 +66,9 @@ - + - + @@ -76,9 +76,9 @@ - + - + @@ -86,9 +86,9 @@ - + - + @@ -96,9 +96,9 @@ - + - + @@ -106,9 +106,9 @@ - + - + @@ -116,59 +116,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/default.svg b/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/default.svg index 79ed059cc15..dad13777e99 100644 --- a/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/default.svg +++ b/packages/g6/__tests__/snapshots/elements/edges/polyline-orth/default.svg @@ -1,14 +1,14 @@ - + - + - + @@ -16,9 +16,9 @@ - + - + @@ -26,9 +26,9 @@ - + - + @@ -36,9 +36,9 @@ - + - + @@ -46,9 +46,9 @@ - + - + @@ -56,9 +56,9 @@ - + - + @@ -66,9 +66,9 @@ - + - + @@ -76,9 +76,9 @@ - + - + @@ -86,9 +86,9 @@ - + - + @@ -96,9 +96,9 @@ - + - + @@ -106,9 +106,9 @@ - + - + @@ -116,59 +116,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/packages/g6/__tests__/snapshots/layouts/custom-dagre/default.svg b/packages/g6/__tests__/snapshots/layouts/custom-dagre/default.svg index dd6f1c846b6..1a421d94096 100644 --- a/packages/g6/__tests__/snapshots/layouts/custom-dagre/default.svg +++ b/packages/g6/__tests__/snapshots/layouts/custom-dagre/default.svg @@ -1,44 +1,44 @@ - + - + - + - + - + - + - + @@ -50,7 +50,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -98,7 +98,7 @@ - + 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 e926473169a..0c1abf42726 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow-combo.svg @@ -1,9 +1,9 @@ - + - + @@ -15,11 +15,11 @@ - + - + - + B @@ -27,7 +27,7 @@ - + @@ -42,9 +42,9 @@ - + - + @@ -52,9 +52,9 @@ - + - + @@ -62,9 +62,9 @@ - + - + @@ -72,9 +72,9 @@ - + - + @@ -82,9 +82,9 @@ - + - + @@ -92,9 +92,9 @@ - + - + @@ -102,9 +102,9 @@ - + - + @@ -112,9 +112,9 @@ - + - + @@ -122,9 +122,9 @@ - + - + @@ -132,9 +132,9 @@ - + - + @@ -142,9 +142,9 @@ - + - + @@ -152,14 +152,14 @@ - + - + - + @@ -171,7 +171,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -207,7 +207,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg index 27698ba1894..d9d69e2e27b 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/antv-flow.svg @@ -1,14 +1,14 @@ - + - + - + @@ -16,9 +16,9 @@ - + - + @@ -26,9 +26,9 @@ - + - + @@ -36,9 +36,9 @@ - + - + @@ -46,9 +46,9 @@ - + - + @@ -56,9 +56,9 @@ - + - + @@ -66,9 +66,9 @@ - + - + @@ -76,9 +76,9 @@ - + - + @@ -86,9 +86,9 @@ - + - + @@ -96,9 +96,9 @@ - + - + @@ -106,9 +106,9 @@ - + - + @@ -116,128 +116,128 @@ - + - + - + - + 0 - + - + 1 - + - + 2 - + - + 3 - + - + 4 - + - + 5 - + - + 6 - + - + 7 - + - + 8 - + - + 9 diff --git a/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg b/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg index 47201a2c3ae..965e2cca8ec 100644 --- a/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg +++ b/packages/g6/__tests__/snapshots/layouts/dagre/dagre.svg @@ -6,39 +6,39 @@ - + - + - + - + - + - + @@ -50,7 +50,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -98,7 +98,7 @@ - + diff --git a/packages/g6/package.json b/packages/g6/package.json index 72d80295b06..a82822d7a9b 100644 --- a/packages/g6/package.json +++ b/packages/g6/package.json @@ -60,19 +60,19 @@ "@antv/algorithm": "^0.1.26", "@antv/component": "^2.1.1", "@antv/event-emitter": "^0.1.3", - "@antv/g": "^6.1.4", - "@antv/g-canvas": "^2.0.20", - "@antv/g-plugin-dragndrop": "^2.0.15", + "@antv/g": "^6.1.6", + "@antv/g-canvas": "^2.0.22", + "@antv/g-plugin-dragndrop": "^2.0.17", "@antv/graphlib": "^2.0.3", "@antv/hierarchy": "^0.6.14", - "@antv/layout": "1.2.14-beta.8", + "@antv/layout": "1.2.14-beta.9", "@antv/util": "^3.3.10", "bubblesets-js": "^2.3.4", "hull.js": "^1.0.6" }, "devDependencies": { - "@antv/g-svg": "^2.0.17", - "@antv/g-webgl": "^2.0.24", + "@antv/g-svg": "^2.0.19", + "@antv/g-webgl": "^2.0.26", "@antv/layout-gpu": "^1.1.7", "@antv/layout-wasm": "^1.4.2", "@types/hull.js": "^1.0.4", diff --git a/packages/g6/src/runtime/layout.ts b/packages/g6/src/runtime/layout.ts index 46c8c4bf748..fad01e9dbff 100644 --- a/packages/g6/src/runtime/layout.ts +++ b/packages/g6/src/runtime/layout.ts @@ -16,7 +16,6 @@ import { createTreeStructure } from '../utils/graphlib'; import { idOf } from '../utils/id'; import { isTreeLayout, layoutAdapter, layoutMapping2GraphData } from '../utils/layout'; import { print } from '../utils/print'; -import { parseSize } from '../utils/size'; import { dfs } from '../utils/traverse'; import type { RuntimeContext } from './types'; @@ -299,7 +298,7 @@ export class LayoutController { const nodeElement = element?.getElement(node.id as string); const { size } = nodeElement?.attributes || {}; - return Math.max(...parseSize(size)); + return size; }); const Ctor = getExtension('layout', type); diff --git a/packages/site/examples/scene-case/default/demo/organization-chart.js b/packages/site/examples/scene-case/default/demo/organization-chart.js index 73d24a5e34b..b268fa384c6 100644 --- a/packages/site/examples/scene-case/default/demo/organization-chart.js +++ b/packages/site/examples/scene-case/default/demo/organization-chart.js @@ -195,7 +195,6 @@ fetch('https://assets.antv.antgroup.com/g6/organization-chart.json') }, layout: { type: 'dagre', - nodeSize: [150, 60], }, autoFit: 'view', behaviors: ['level-of-detail', 'zoom-canvas', 'drag-canvas'], diff --git a/packages/site/examples/scene-case/default/demo/performance-diagnosis-flowchart.js b/packages/site/examples/scene-case/default/demo/performance-diagnosis-flowchart.js index bf585908b70..738e0b766f5 100644 --- a/packages/site/examples/scene-case/default/demo/performance-diagnosis-flowchart.js +++ b/packages/site/examples/scene-case/default/demo/performance-diagnosis-flowchart.js @@ -89,10 +89,10 @@ export const PerformanceDiagnosisFlowchart = () => { }; const size = { - 'pre-inspection': [240, 80], - problem: [200, 80], - inspection: [280, 100], - solution: [240, 60], + 'pre-inspection': [240, 120], + problem: [200, 120], + inspection: [330, 100], + solution: [200, 120], }[d.data.type] || [200, 80]; Object.assign(style, { @@ -142,9 +142,6 @@ export const PerformanceDiagnosisFlowchart = () => { }, layout: { type: 'antv-dagre', - nodeSize: [200, 40], - nodesep: 50, - ranksep: 5, }, behaviors: ['zoom-canvas', 'drag-canvas', 'hover-element', 'click-select'], }); diff --git a/packages/site/package.json b/packages/site/package.json index 309b6977889..221ef8da023 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -41,9 +41,9 @@ "@ant-design/icons": "^5.5.1", "@antv/algorithm": "^0.1.26", "@antv/dumi-theme-antv": "^0.5.3", - "@antv/g": "^6.1.4", - "@antv/g-svg": "^2.0.17", - "@antv/g-webgl": "^2.0.24", + "@antv/g": "^6.1.6", + "@antv/g-svg": "^2.0.19", + "@antv/g-webgl": "^2.0.26", "@antv/g2": "^5.2.7", "@antv/g6": "workspace:*", "@antv/g6-extension-3d": "workspace:*",