Skip to content

Commit

Permalink
Merge pull request #480 from antvis/update/docs
Browse files Browse the repository at this point in the history
Update/docs
  • Loading branch information
pomelo-nwu authored Apr 17, 2023
2 parents deca5f5 + 0506ef2 commit 89f7be7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 41 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/mirror.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .umirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default {
navs: [
null,
{
title: 'GraphInsight',
path: 'https://graphinsight.antgroup.com/home.html#/',
title: '在线分析工具 G6VP',
path: 'https://insight.antv.antgroup.com',
},
// {
// title: 'GitHub',
Expand Down Expand Up @@ -92,8 +92,9 @@ export default {
'https://gw.alipayobjects.com/os/lib/react-dom/16.13.1/umd/react-dom.development.js',
'https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd-with-locales.js',
/** G6 **/
'https://gw.alipayobjects.com/os/lib/antv/g6/4.7.0/dist/g6.min.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.7.0/dist/g6.min.js.map',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.9/dist/g6.min.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.9/dist/g6.min.js.map',

/** lodash */
'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js',
],
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ A React toolkit for graph analysis based on G6

## 🌾 New Products!

2022.06.06, this day coincides with the 4th anniversary of the open source of G6, which is also the traditional Chinese solar term: "Grain in Ear", GraphInsight, a new product in the direction of graph analysis. Users can complete the visualization, exploration and analysis tasks of relational data online without code development. You can also export the SDK with one click and integrate it into the business system to help developers improve R&D efficiency.
2022.06.06, this day coincides with the 4th anniversary of the open source of G6, which is also the traditional Chinese solar term: "Grain in Ear", G6VP, a new product in the direction of graph analysis. Users can complete the visualization, exploration and analysis tasks of relational data online without code development. You can also export the SDK with one click and integrate it into the business system to help developers improve R&D efficiency.

The SDK exported by GraphInsight is encapsulated based on Graphin. If you want to understand the capabilities of Graphin, you can take a look at the product [GraphInsight](https://github.com/antvis/GraphInsight)
The SDK exported by G6VP is encapsulated based on Graphin. If you want to understand the capabilities of Graphin, you can take a look at the product [G6VP](https://github.com/antvis/G6VP)

## ✨ Features

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ A React toolkit for graph analysis based on G6

## 🌾 新产品!

2022.06.06 ,这天恰逢 G6 开源 4 周年,也是中国传统节气芒种日,我们对外发布一款图分析方向的新品 GraphInsight,用户无需代码开发,即可在线完成关系数据的可视化与探索分析任务。还可一键导出 SDK,集成到业务系统中,帮助开发者研发提效。
2022.06.06 ,这天恰逢 G6 开源 4 周年,也是中国传统节气芒种日,我们对外发布一款图分析方向的新品 G6VP,用户无需代码开发,即可在线完成关系数据的可视化与探索分析任务。还可一键导出 SDK,集成到业务系统中,帮助开发者研发提效。

GraphInsight 所导出的 SDK 正是基于 Graphin 封装的,如果你想了解 Graphin 的能力,不妨可以在 [GraphInsight](https://github.com/antvis/GraphInsight) 这款产品中一窥究竟
G6VP 所导出的 SDK 正是基于 Graphin 封装的,如果你想了解 Graphin 的能力,不妨可以在 [G6VP](https://github.com/antvis/G6VP) 这款产品中一窥究竟

## ✨ 功能特性

Expand Down
2 changes: 1 addition & 1 deletion packages/graphin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/graphin",
"version": "2.7.13",
"version": "2.7.14",
"description": "the react toolkit for graph analysis based on g6",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
13 changes: 11 additions & 2 deletions packages/graphin/src/Graphin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ class Graphin extends React.PureComponent<GraphinProps, GraphinState> {
const finalStyle = {
defaultNode: { style: { ...defaultNode.style, _theme: theme }, type: defaultNode.type || 'graphin-circle' }, // isGraphinNodeType ? deepMix({}, defaultNodeStyle, defaultNode) : defaultNode,
defaultEdge: { style: { ...defaultEdge.style, _theme: theme }, type: defaultEdge.type || 'graphin-line' }, // isGraphinEdgeType ? deepMix({}, defaultEdgeStyle, defaultEdge) : defaultEdge,
defaultCombo: { style: { ...defaultCombo.style, _theme: theme }, type: defaultCombo.type || 'combo', labelCfg: defaultCombo.labelCfg }, // deepMix({}, defaultComboStyle, defaultCombo), // TODO:COMBO的样式需要内部自定义
defaultCombo: {
style: { ...defaultCombo.style, _theme: theme },
type: defaultCombo.type || 'combo',
labelCfg: defaultCombo.labelCfg,
}, // deepMix({}, defaultComboStyle, defaultCombo), // TODO:COMBO的样式需要内部自定义
/** status 样式 */
nodeStateStyles, // isGraphinNodeType ? deepMix({}, defaultNodeStatusStyle, nodeStateStyles) : nodeStateStyles,
edgeStateStyles, // isGraphinEdgeType ? deepMix({}, defaultEdgeStatusStyle, edgeStateStyles) : edgeStateStyles,
Expand Down Expand Up @@ -499,7 +503,12 @@ class Graphin extends React.PureComponent<GraphinProps, GraphinState> {
* 组件移除的时候
*/
componentWillUnmount() {
this.clear();
const { willUnmount } = this.props;
if (willUnmount) {
willUnmount();
} else {
this.clear();
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/graphin/src/typings/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export interface GraphinProps {
* Text direction, to support languages like Arabic and Hebrew.
*/
dir?: 'ltr' | 'rtl';
willUnmount?: () => void;
}

export interface IUserNode extends BaseNode, Partial<RestNode>, UserProperties {}
Expand Down

0 comments on commit 89f7be7

Please sign in to comment.