如何通过线角相互连接元素
如何将元素与图片中的行连接起来?当您单击一个圆,然后单击另一个圆时,应绘制一条线。也许有一个用于此任务的库,我搜索了,但没有发现任何有用的东西。 Angular。在此处输入图像描述“>
更新
屏幕的大小也应更改行。我还考虑应用诸如D3和Cytoscape之类的库,因为它们似乎允许绘制此类行。也许有人有一些例子?
How to connect the elements with a line like in the picture? When you click on one circle and then another, a line should be drawn. Maybe there is a library for this task, I've searched but haven't found anything useful. Angular.
Update
The size of the screen should also change the line. I was also thinking of applying libraries such as d3 and cytoscape, as they seem to allow for drawing such lines. Maybe someone has some examples?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我为我找到了解决方案: LeadingLine
I found solution for me: LeaderLine
您可以使用 gojs 。
GOJS与角兼容。 ( document )
此样本与您的需求相似:样品一个,样品两个
You can use GoJs.
The GoJs is Compatible with angular. (Document)
This sample is similar to your needs: sample one, sample two
您可以用SVG制作这些东西。因为只有几行和圆圈。我在这里拼成一个小例子: https://stackblitz.com/editz.com/edit/edit/edit/angular-ivy-ivy--ivy--- OVHBWW
它基本上使用SVG绘制东西。 SVG是创建原因,您可以添加事件和动画。使用相当简单的代码。我在链接中提出的更多是您如何做到这一点。不是最伟大的代码:)
You can make this stuff with svg. since its only a few lines and circles. I stitch a small example together here : https://stackblitz.com/edit/angular-ivy-ovhbww
Its basically use svg to draw things. Svg is create cause you can add events and also animation if you feel like it. With fairly simple code. What i put in the link is more of inspiration of how you could do it. Not so much that its the greatest piece of code :)