handleAfterLayout not working with graphin-force layout
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
目前使用 graphin-force layout 搭配 MiniMap
但是 layout 完成後,MiniMap 沒有顯示當下的佈局的結果
爬文發現是因為效能考量,所以決定在 layout 完成後,手動更新 MiniMap
Graphin 本身提供的 handleAfterLayout 並不會在使用 graphin-force layout 的情況下被 trigger
而 G6 的 afteranimate 目前測試也是不會被 trigger
不曉得還有什麼方法可以做到?
### Your Example Website or App
https://codesandbox.io/s/priceless-wind-r6werq?file=/App.tsx
### Steps to Reproduce the Bug or Issue
直接參考連結
### Expected behavior
MiniMap 在 layout 完成後更新
### Screenshots or Videos
_No response_
### Platform
Grahpin: 2.6.6
### Additional context
_No response_
Contributor guide
Research direction
Start with the linked CodeSandbox and its App.tsx reproduction, focusing on the graphin-force layout, MiniMap, handleAfterLayout, and G6 afteranimate behavior. Trace the layout completion events and determine how the MiniMap can be updated after the layout finishes. Done means the MiniMap reflects the completed layout in the reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100