-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(module: graph): support graph component #6053
Conversation
This preview will be available after the AzureCI is passed. |
f09c978
to
8ef8126
Compare
Codecov Report
@@ Coverage Diff @@
## master #6053 +/- ##
==========================================
- Coverage 89.95% 89.83% -0.12%
==========================================
Files 465 465
Lines 14046 14078 +32
Branches 2308 2235 -73
==========================================
+ Hits 12635 12647 +12
- Misses 863 880 +17
- Partials 548 551 +3
Continue to review full report at Codecov.
|
cbd1b95
to
86c1d3c
Compare
feat(module: graph): init graph feat(module: graph): fix package.json fix(module: graph): fix some definitions fix(module: graph): extend interfaces fix(module: graph): improve autofit size fix(module: graph): fix padding of sub graph, it still has bug fix(module: graph): change package and demo fix(module: graph): allow toggle node by icon fix(module: graph): fix center position fix(module: graph): add minimap fix(module: graph): use d3-* instead of d3 and improve docs fix(module: graph): remove download function fix(module: graph): fix interface and render bugs fix(module: graph): support arrow element fix(module: graph): rename layout method fix(module: graph): refactor apis and inputs fix(module: graph): support custom node template
2f5ee2d
to
06137af
Compare
|
||
export class NzGraphData implements NzGraphBaseSource<NzGraphDataDef, string> { | ||
_data = new BehaviorSubject<NzGraphDataDef>({} as NzGraphDataDef); | ||
dataSource!: NzGraphDataDef; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor 构造参数是可选的,这里类型不安全
this.cdr.detectChanges(); | ||
}); | ||
} else { | ||
throw Error(`A valid data source must be provided.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既然已经在 ngAfterContentChecked 中检查了,这里为什么还要抛错
export const NZ_GRAPH_LAYOUT_SETTING: NzLayoutSetting = { | ||
animation: { | ||
/** Default duration for graph animations in ms. */ | ||
duration: 250 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
animatonBuilder 中没有使用这块配置
const height = contentEle.getBoundingClientRect().height; | ||
const width = contentEle.getBoundingClientRect().width; | ||
// Element id type is string | ||
const targetNode = flattenNodes(renderInfo).find(n => `${n.name}` === nodeEle.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 deepFind, flattenNodes 每次都是全量循环
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
部分暂时不改了,下个版本一起做掉,这个rc版本先内部试用
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information