-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: add HTML node, g node, react node #5654
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
Conversation
Aarebecca
commented
Apr 17, 2024

- 添加 HTML 节点元素 / Add HTML node element
- 添加 JSX 写法的 G Node / Add GNode element can be written in JSX
- 添加 ReactNode 元素 / Add ReactNode element
- Graph 未传入尺寸时使用容器尺寸 / Graph Uses container dimensions when no size is passed in
- 完善 Graph 销毁后调用 render/draw 的场景校验 / Perfect the scene verification by calling render/draw after Graph destruction
8221295
to
21e8d7c
Compare
21e8d7c
to
9e33abd
Compare
import { createRoot } from 'react-dom/client'; | ||
|
||
export interface ReactNodeStyleProps extends HTMLStyleProps { | ||
component: FC; |
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.
innerHTML 要 omit 掉
import { HTML } from '@antv/g6'; | ||
import type { FC, ReactNode as IReactNode } from 'react'; | ||
import type { Root } from 'react-dom/client'; | ||
import { createRoot } from 'react-dom/client'; |
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.
不是直接从 react-dom import 吗?这个区别是啥
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.
createRoot
是从 react-dom/client
导出的,react-dom
并没有导出
@@ -0,0 +1 @@ | |||
export { ReactNodeEvent } from './events'; |
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.
这个好像不需要用到?
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.
这个是之前的逻辑,忘删了