We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
场景:我的Node左侧有一排port(设计上只有左侧有port,所以选用了left布局),默认使用的是left布局自动计算。目前加上了elk的自动布局计算,需要给port添加指定的坐标点来覆盖left布局的坐标点。
https://x6.antv.antgroup.com/zh/examples/node/port/#group
如果是 absolute 布局, 页面显示正常。
import { Graph } from '@antv/x6' const graph = new Graph({ container: document.getElementById('container'), grid: true, }) const rect = graph.addNode({ x: 133, y: 54, width: 300, height: 140, attrs: { body: { fill: '#f5f5f5', stroke: '#d9d9d9', strokeWidth: 1, }, }, ports: { groups: { left: { position: 'absolute', label: { position: { name: 'left' } }, markup: { tagName: 'rect', selector: 'rect', attrs: { width: 10, height: 10, y: -5, }, }, attrs: { rect: { x: -10 } } }, }, items: [ { "id": "1JMHB2LZ7byw8n2L_t0XW", "group": "left", "attrs": { "rect": { "x": -10, "y": 8.7625 } } }, { "id": "c9Q96glHBadWmlL8iVt8e", "group": "left", "attrs": { "rect": { "x": 0, "y": 30 } } }, { "id": "3fttVEw3Cjb7yQfn_YO-E", "group": "left", "attrs": { "rect": { "x": 10, "y": 102.575 } } } ] }, })
如果将 groups的position改为left,那么覆盖的坐标将超出图形。
使用姿势有问题吗?
传入坐标之后以坐标为准。
No response
The text was updated successfully, but these errors were encountered:
页面的最终位置是:left 布局成功之后的坐标 和 attrs 或者 args 传入的参数,做一次加法
该场景可以通过传入 args 的 dx 和 dy 参数实现。
Sorry, something went wrong.
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.
No branches or pull requests
问题描述
场景:我的Node左侧有一排port(设计上只有左侧有port,所以选用了left布局),默认使用的是left布局自动计算。目前加上了elk的自动布局计算,需要给port添加指定的坐标点来覆盖left布局的坐标点。
重现链接
https://x6.antv.antgroup.com/zh/examples/node/port/#group
重现步骤
如果是 absolute 布局, 页面显示正常。

如果将 groups的position改为left,那么覆盖的坐标将超出图形。

使用姿势有问题吗?
预期行为
传入坐标之后以坐标为准。

平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: