Skip to content
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

创建连接桩markup使用rect标签,sourceAnchor配置的name不生效,线的起点难修改 #4037

Open
weimobcopilot09 opened this issue Nov 15, 2023 · 2 comments

Comments

@weimobcopilot09
Copy link

问题描述

创建连接桩,要自定义形状和大小,代码如下

		acc.push({
			markup: {
                                // tagName改成circle就生效,rect不生效
				tagName: 'rect',
				selector: 'body',
				style: {
					width: width,
					height: 20,
					stroke: 'transparent',
					fill: 'transparent',
					magnet: true,
					zIndex: 999999,
				},
			},
			attrs: {
                                // tagName改成circle
				rect: {
					magnet: true,
				},
			},
			label: {
				position: {
					name: 'right',
				},
			},
			args: {
				x: index === 0 ? 17 : acc[index - 1].distance + 17,
			},
			distance: distance,
			text: item.branchName,
			stylGroup: item.styleGroup,
			group: getPortsGroup(item),
			id: item.uuid,
		});

锚点配置如下

		sourceAnchor: {
			name: 'bottomRight',
			args: {
				// dx: 10,
				// dy: 6,
			},
		},
		connectionPoint: {
			name: 'anchor',
		},

重现链接

重现步骤

预期行为

当使用rect标签时,连接桩的连接线的起点固定时左上角,必须指定dx/dy才能移动,指定为circle标签时,name配置可以生效
期望在使用rect标签时,也可以正确设置起点

平台

  • 操作系统:macOS
  • 网页浏览器: Google Chrome
  • X6 版本: 2.15.3

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 15, 2023

👋 @weimobcopilot09

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.

@RuiCaiSmile
Copy link

错误使用了公共账号,是否可以帮忙删除这个issue?😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants