mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 12:49:04 +08:00
fix: unexpected error occurs when points of a hull are all duplicated; (#4192)
This commit is contained in:
parent
b3a10ddc52
commit
57b11a93f7
@ -1,5 +1,9 @@
|
||||
# ChangeLog
|
||||
|
||||
### 4.8.3
|
||||
|
||||
- fix: unexpected error occurs when points of a hull are all duplicated;
|
||||
|
||||
### 4.8.2
|
||||
|
||||
- perf: add updateShape function for donut node, closes: #4091;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6-core",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"description": "A Graph Visualization Framework in JavaScript",
|
||||
"keywords": [
|
||||
"antv",
|
||||
|
@ -19,6 +19,13 @@ export const genConvexHull = (items: Item[]) => {
|
||||
points.sort((a, b) => {
|
||||
return a.x === b.x ? a.y - b.y : a.x - b.x;
|
||||
});
|
||||
// remove duplicate points
|
||||
const pointMap = {}
|
||||
for (let i = points.length - 1; i >= 0; i--) {
|
||||
const { x, y } = points[i]
|
||||
if (pointMap[`${x}-${y}`]) points.splice(i, 1);
|
||||
pointMap[`${x}-${y}`] = true;
|
||||
}
|
||||
|
||||
if (points.length === 1) {
|
||||
return points;
|
||||
|
@ -64,7 +64,7 @@ const colorSet = {
|
||||
};
|
||||
|
||||
export default {
|
||||
version: '0.8.2',
|
||||
version: '0.8.3',
|
||||
rootContainerClassName: 'root-container',
|
||||
nodeContainerClassName: 'node-container',
|
||||
edgeContainerClassName: 'edge-container',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6-element",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"description": "A Graph Visualization Framework in JavaScript",
|
||||
"keywords": [
|
||||
"antv",
|
||||
@ -61,7 +61,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g-base": "^0.5.1",
|
||||
"@antv/g6-core": "0.8.2",
|
||||
"@antv/g6-core": "0.8.3",
|
||||
"@antv/util": "~2.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "4.8.2",
|
||||
"version": "4.8.3",
|
||||
"description": "A Graph Visualization Framework in JavaScript",
|
||||
"keywords": [
|
||||
"antv",
|
||||
@ -66,7 +66,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g6-pc": "0.8.2"
|
||||
"@antv/g6-pc": "0.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.7.7",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import G6 from '@antv/g6-pc';
|
||||
|
||||
G6.version = '4.8.2';
|
||||
G6.version = '4.8.3';
|
||||
|
||||
export * from '@antv/g6-pc';
|
||||
export default G6;
|
||||
export const version = '4.8.2';
|
||||
export const version = '4.8.3';
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6-pc",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"description": "A Graph Visualization Framework in JavaScript",
|
||||
"keywords": [
|
||||
"antv",
|
||||
@ -75,9 +75,9 @@
|
||||
"@antv/g-canvas": "^0.5.2",
|
||||
"@antv/g-math": "^0.1.1",
|
||||
"@antv/g-svg": "^0.5.1",
|
||||
"@antv/g6-core": "0.8.2",
|
||||
"@antv/g6-element": "0.8.2",
|
||||
"@antv/g6-plugin": "0.8.2",
|
||||
"@antv/g6-core": "0.8.3",
|
||||
"@antv/g6-element": "0.8.3",
|
||||
"@antv/g6-plugin": "0.8.3",
|
||||
"@antv/hierarchy": "^0.6.7",
|
||||
"@antv/layout": "^0.3.0",
|
||||
"@antv/matrix-util": "^3.1.0-beta.3",
|
||||
|
@ -7,7 +7,7 @@ const textColor = 'rgb(0, 0, 0)';
|
||||
const colorSet = getColorsWithSubjectColor(subjectColor, backColor);
|
||||
|
||||
export default {
|
||||
version: '0.8.2',
|
||||
version: '0.8.3',
|
||||
rootContainerClassName: 'root-container',
|
||||
nodeContainerClassName: 'node-container',
|
||||
edgeContainerClassName: 'edge-container',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6-plugin",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"description": "G6 Plugin",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -22,8 +22,8 @@
|
||||
"@antv/g-base": "^0.5.1",
|
||||
"@antv/g-canvas": "^0.5.2",
|
||||
"@antv/g-svg": "^0.5.2",
|
||||
"@antv/g6-core": "0.8.2",
|
||||
"@antv/g6-element": "0.8.2",
|
||||
"@antv/g6-core": "0.8.3",
|
||||
"@antv/g6-element": "0.8.3",
|
||||
"@antv/matrix-util": "^3.1.0-beta.3",
|
||||
"@antv/scale": "^0.3.4",
|
||||
"@antv/util": "^2.0.9",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@antv/g6-site",
|
||||
"version": "4.8.2",
|
||||
"version": "4.8.3",
|
||||
"description": "G6 sites deployed on gh-pages",
|
||||
"keywords": [
|
||||
"antv",
|
||||
|
Loading…
Reference in New Issue
Block a user