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

[Bug Report]: 有没有办法实现节点跟网格两边对齐,而非节点的中心线跟网格线对齐 #1474

Open
camellieeee opened this issue Jan 10, 2024 · 2 comments

Comments

@camellieeee
Copy link

发生了什么?

比如当网格间距为5,节点宽度为15的时候,这个时候节点两边就不能跟网格线对齐了
20240110-190814

logicflow/core版本

1.2.18

logicflow/extension版本

1.2.20

logicflow/engine版本

No response

浏览器&环境

Chrome

@camellieeee camellieeee added the bug Something isn't working label Jan 10, 2024
@wumail
Copy link
Collaborator

wumail commented Jan 11, 2024

你的需求里gridSize必须是5,节点宽高必须是15吗?
如果不是,gridSize和节点宽高满足(width or height)/2 % gridSize === 0
如果是,在你举的这个例子下,尝试把网格平移 grid / 2

@camellieeee
Copy link
Author

@wumail 节点15和网格宽度5只是举了个例子。
实际情况是节点的宽高不一定是网格宽度的偶数倍,比如网格宽度为1,节点有可能是3或者5或者7。
如此节点的边缘将不会与网格线对齐,除非强行约定节点的长宽为2或者4或者6,类似的偶数倍才行。

@boyongjiong boyongjiong added new feature and removed bug Something isn't working labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants