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]自动插入节点功能,使用addEdge绘制的连线上无法触发自动插入节点功能 #723

Open
WangShuXian6 opened this issue Aug 7, 2022 · 1 comment
Labels
优化 New feature or request

Comments

@WangShuXian6
Copy link

WangShuXian6 commented Aug 7, 2022

问题描述

  1. 问题触发的条件

使用 InsertNodeInPolyline 插件

使用 addEdge 在两个节点A,B间增加连线 edgeA,edgeB

  1. 期望的表现

将 新节点C拖入连线 edgeA 上时,将节点C 变成A,B的中间节点

  1. 实际的表现
    问题1:

C 节点依然是一个游离节点
image

问题2:

自定义锚点的节点与其他节点链接锚点会在拖动连线时发生错误

addEdge定义了自定义节点第二个锚点【右锚点】与下一个节点【结束节点】链接
image

在连线上插入新节点,拖动新节点后,突然变成了自定义节点一个锚点【左锚点】与下一个节点链接
image

最简复现demo

使用addEdge绘制的连线上无法触发自动插入节点功能
https://codesandbox.io/s/addedgehui-zhi-de-lian-xian-shang-wu-fa-chu-fa-zi-dong-cha-ru-jie-dian-gong-neng-03oxkq?file=/src/index.js

addEdge绘制的连线上加入新节点后拖动新节点锚点错误
https://codesandbox.io/s/addedgehui-zhi-de-lian-xian-shang-jia-ru-xin-jie-dian-hou-tuo-dong-xin-jie-dian-mao-dian-cuo-wu-8ivgse?file=/src/index.js

@towersxu
Copy link
Collaborator

towersxu commented Aug 10, 2022

  1. 这里是有问题,目前InsertNodeInPolyline只能在节点中心点在连线上才能触发,让连线不在网格上时,就会出现无法连线的问题。
  2. 第二个应该不是问题,如果希望保持锚点不变,需要你自定义锚点和保存锚点信息http:https://logic-flow.org/guide/basic/edge.html#%E4%BF%9D%E5%AD%98%E9%94%9A%E7%82%B9%E4%BF%A1%E6%81%AF

@boyongjiong boyongjiong added the 优化 New feature or request label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
优化 New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants