LogicFlow icon indicating copy to clipboard operation
LogicFlow copied to clipboard

getAnchorLineStyle 不知道是哪个瞄点数据

Open GengZiwei opened this issue 3 years ago • 10 comments

拖出连线样式的时候 不知道是哪个瞄点 是不是有些奇怪

目前来看只能通过事件来确定

期望在getAnchorLineStyle接收到 anchorInfo的数据

GengZiwei avatar Sep 09 '22 03:09 GengZiwei

不同锚点拖出来的引导连线样式不一样,这个需求感觉有点太多定制了,能贴一下这功能在你们项目中的具体效果吗?最好是UI设计图这类比较直观的。

towersxu avatar Sep 09 '22 06:09 towersxu

@towersxu
image 一个node上面有不同的瞄点,连线的样式根据瞄点的数据进行展示不同的样式

GengZiwei avatar Sep 15 '22 06:09 GengZiwei

拖出连线样式 也是根据瞄点的数据进行展示的。

目前看代码 getAnchorStyle 有接收的anchorInfo数据, 但是getAnchorLineStyle却没有anchorInfo数据

GengZiwei avatar Sep 15 '22 07:09 GengZiwei

如果是实现上面的图,LogicFlow现在是支持的,用getAnchorStyle设置锚点的样式和重写edge的getEdgeStyle设置连线的样式。getAnchorLineStyle表示的是连线的过程中连线的样式。 image

towersxu avatar Sep 15 '22 07:09 towersxu

@towersxu 对,我提出来的问题是在getAnchorLineStyle 连线的过程中连线的样式 获取不到anchorInfo的数据

GengZiwei avatar Sep 16 '22 17:09 GengZiwei

连线的过程中连线的样式为什么需要改呢?我看你的图是连线完成后的连线样式不一样。

towersxu avatar Sep 17 '22 02:09 towersxu

这个功能我认为还是挺常见的。 比如: 瞄点是绿色 ,连线的过程中连线的样式是绿色。 瞄点是红色 ,连线的过程中连线的样式是红色。 或者根据瞄点的类型来设置实线还是虚线(业务自己方面的展示)。

获取 image image

getAnchorLineStyle获取瞄点数据目前我已经通过事件监听实现了,但是感觉比较繁琐是不是由框架内部直接抛出。

连线的过程中连线的样式为什么需要改呢?我看你的图是连线完成后的连线样式不一样。

GengZiwei avatar Sep 19 '22 08:09 GengZiwei

嗯,这样看起来效果确实好很多,这个功能我们下版本支持,也欢迎PR。

towersxu avatar Sep 19 '22 08:09 towersxu

getAnchorLineStyle

请问一下 getAnchorLineStyle 可以添加箭头嘛

GengZiwei avatar Sep 19 '22 08:09 GengZiwei

连线过程中的连接线不支持箭头。

towersxu avatar Sep 19 '22 08:09 towersxu