-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
node/edge clone的时候 如何使用自定义id? #3011
Comments
这个的场景是什么呢? |
复制节点的时候,我看会调用clone方法 |
如果是复制粘贴场景,提供一个思路:可以在粘贴后使用 |
那我是不是可以直接监听cell:added 事件对这个Id的进行修改? |
@cuidong626 还是推荐粘贴方法执行后更新节点 id,因为与很多原因导致 |
我还是希望能提供一个机制,用于自己生成id,或者可不可以在cell里面写一个生成Id的方法,开发者通过原型链重写?就像 generatePortId这个方法一样 |
@cuidong626 外部自定义 id 非常容易导致错误,比如 id 重复、id 匹配不上等。 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
功能描述
cell 构造函数会判断id是开发配置还是采用uuid,但是调用 clone 方法的时候就没办法自定义了。
希望提供一个机制,可以自己根据业务规则创建 id
期望解决方案
node/edge 使用 clone 方法的时候 可以自定义的 id
希望提供一个机制,可以自己根据业务规则创建id
The text was updated successfully, but these errors were encountered: