Closed MrMengJ closed 2 years ago
👋 @MrMengJ
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
@lifesinger @RaoHai @linhuiw @rockdai
[测试有效] 可以尝试使用 useConfig
注册,代替FlowchartNodePanel
https://github.com/antvis/XFlow/blob/be80d8a0651993ad66e34266aea8f101c6531f72/packages/xflow-extension/src/flowchart-canvas/config-graph.tsx#L247
[测试有效] 可以尝试使用
useConfig
注册,代替FlowchartNodePanel
谢谢,已经通过别的方式来实现啦
This thread has been automatically locked because it has not had recent activity.
Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the bug
通过
NodeCollapsePanel
组件定义的自定义图形,无法往画图面板上添加Your Example Website or App
https://codesandbox.io/s/condescending-andras-5bcz4l
Steps to Reproduce the Bug or Issue
无法往画图面板上添加自定义图形
Expected behavior
期望可以往画图面板上添加自定义的图形
Screenshots or Videos
报错代码位置 https://github.com/antvis/XFlow/blob/be80d8a0651993ad66e34266aea8f101c6531f72/packages/xflow-core/src/command-contributions/node/node-add.ts#L159
Platform
Additional context
通过调试发现在源代码处,是因为在
flowchart-canvas
组件里并未注册自定义的图形,导致往画图面板添加图形的时候根据renderKey
找不到对应component
https://github.com/antvis/XFlow/blob/be80d8a0651993ad66e34266aea8f101c6531f72/packages/xflow-extension/src/flowchart-canvas/config-graph.tsx#L75
https://github.com/antvis/XFlow/blob/be80d8a0651993ad66e34266aea8f101c6531f72/packages/xflow-extension/src/flowchart-node-panel/utils.tsx#L98
https://github.com/antvis/XFlow/blob/be80d8a0651993ad66e34266aea8f101c6531f72/packages/xflow-core/src/command-contributions/node/node-add.ts#L159