From 93ca3d77b62651981eaf5a26078dc9b922dee37a Mon Sep 17 00:00:00 2001 From: Yanyan-Wang Date: Mon, 24 Aug 2020 20:29:43 +0800 Subject: [PATCH] docs: update bubble set example. docs: update changelog and version number. --- CHANGELOG.md | 10 ++++++++++ examples/interaction/hull/demo/changeMembers.js | 10 ++++++++-- examples/interaction/hull/demo/hull.js | 7 +++++-- gatsby-browser.js | 4 ++-- package.json | 4 ++-- src/global.ts | 2 +- src/util/graphic.ts | 2 +- 7 files changed, 29 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6399c2ad70..f7398df4db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # ChangeLog +#### 3.7.0 + +- feat: chart node; +- feat: bubble set; +- feat: custom node with xml; +- feat: minimum spanning tree algorithm; +- feat: path finding algorithm; +- feat: cycle finding algorithm; +- chore: update antv/hierarchy to fix indented tree with dropCap problem. + #### 3.6.2 - feat: find all paths and the shortest path between two nodes; diff --git a/examples/interaction/hull/demo/changeMembers.js b/examples/interaction/hull/demo/changeMembers.js index 3762279180..01ceae4e32 100644 --- a/examples/interaction/hull/demo/changeMembers.js +++ b/examples/interaction/hull/demo/changeMembers.js @@ -134,13 +134,19 @@ const data = { ], }; +const width = document.getElementById('container').scrollWidth; +const height = document.getElementById('container').scrollHeight || 500; const graph = new G6.Graph({ container: 'container', - width: 500, - height: 500, + width, + height, modes: { default: ['drag-canvas', 'zoom-canvas', 'drag-node'], }, + fitView: true, + layout: { + type: 'grid' + } }); graph.data(data); diff --git a/examples/interaction/hull/demo/hull.js b/examples/interaction/hull/demo/hull.js index 0a22c7fcda..ca0670012a 100644 --- a/examples/interaction/hull/demo/hull.js +++ b/examples/interaction/hull/demo/hull.js @@ -46,10 +46,13 @@ descriptionDiv.innerHTML = 'Wait for the layout to complete...'; const graphDiv = document.getElementById('container'); graphDiv.appendChild(descriptionDiv); +const width = document.getElementById('container').scrollWidth; +const height = document.getElementById('container').scrollHeight || 500; + const graph = new G6.Graph({ container: 'container', - width: 500, - height: 500, + width, + height, modes: { default: ['drag-canvas', 'zoom-canvas', 'drag-node', 'lasso-select'], }, diff --git a/gatsby-browser.js b/gatsby-browser.js index de19224340..d314bea4b2 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1,4 +1,4 @@ -window.g6 = require('./src/index.ts'); // import the source for debugging -// window.g6 = require('./dist/g6.min.js'); // import the package for webworker +// window.g6 = require('./src/index.ts'); // import the source for debugging +window.g6 = require('./dist/g6.min.js'); // import the package for webworker window.insertCss = require('insert-css'); window.Chart = require('@antv/chart-node-g6'); diff --git a/package.json b/package.json index 245b0bad9d..533241a238 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6", - "version": "3.6.2", + "version": "3.7.0", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", @@ -130,4 +130,4 @@ "webpack-cli": "^3.3.10", "worker-loader": "^3.0.0" } -} +} \ No newline at end of file diff --git a/src/global.ts b/src/global.ts index c675f764ad..06ed3c96ec 100644 --- a/src/global.ts +++ b/src/global.ts @@ -1,5 +1,5 @@ export default { - version: '3.6.2', + version: '3.7.0', rootContainerClassName: 'root-container', nodeContainerClassName: 'node-container', edgeContainerClassName: 'edge-container', diff --git a/src/util/graphic.ts b/src/util/graphic.ts index 157686a8ba..9728f57ddd 100644 --- a/src/util/graphic.ts +++ b/src/util/graphic.ts @@ -706,7 +706,7 @@ export const getComboBBox = (children: ComboTree[], graph: IGraph): BBox => { export const getChartRegion = ( params: { - group: IGroup, + group: Group, width: number, height: number, x: number,