内置的class名x6-graph 不自动添加到dom上
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
- react中使用
`container` 添加`className`,渲染出来会自动添加`x6-graph`类名,样式正常生效
但是如果本身不添加`className`,渲染出来就不会有这个类名,导致默认的右键菜单位置不对等问题。
- 相关版本
"@antv/x6": "^2.18.1",
"@antv/x6-plugin-clipboard": "^2.1.6",
"@antv/x6-plugin-dnd": "^2.1.1",
"@antv/x6-plugin-keyboard": "^2.2.3",
"@antv/x6-plugin-scroller": "^2.0.10",
"@antv/x6-plugin-selection": "^2.2.2",
"@antv/x6-react-components": "^2.0.8",
"@antv/x6-react-shape": "^2.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
### Your Example Website or App
无
### Steps to Reproduce the Bug or Issue
无
### Expected behavior
无
### Screenshots or Videos
_No response_
### Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 2.11.1]
### Additional context
_No response_
Contributor guide
Research direction
The report concerns the React container and its className handling in @antv/x6. Start by reproducing the graph without a supplied className, then inspect the container-rendering entry point and compare it with the className case. Done means the x6-graph class is present in both cases and the default context-menu positioning works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100