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]: 使用lf.getGraphData获取的数据,再用lf,render渲染时,图案前后不一致,其中,节点没有问题,边的渲染有问题 #2037

Open
xunyuwenruo opened this issue Jan 9, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@xunyuwenruo
Copy link

发生了什么?

使用lf.getGraphData获取的数据,再用lf,render渲染时,图案前后不一致,其中,节点没有问题,边的渲染有问题。
本人初步发现lf.getGraphData获取的数据中,边的起止坐标和实际图案展示的不一致。
初始使用以下代码渲染,保存this.storeData = this.lf.getGraphData()的数据后,又用this.lf.render(this.storeData)渲染,两次坐标不一致。
保存更新后图案
初始图案

this.lf.render({
nodes: [
{
id: "1",
type: "rect",
x: 100,
y: 100,
},
{
id: "2",
type: "circle",
x: 300,
y: 200,
},
],
edges: [
{
id: "edge1",
type: "polyline",
sourceNodeId: "1",
targetNodeId: "2",
startPoint: { x: 150, y: 100 },
endPoint: { x: 250, y: 200 },
pointList: [
{ x: 150, y: 100 },
{ x: 200, y: 100 },
{ x: 200, y: 200 },
{ x: 250, y: 200 },
],
},
{
id: "edge2",
type: "polyline",
sourceNodeId: "2",
targetNodeId: "1",
startPoint: { x: 50, y: 150 },
endPoint: { x: 200, y: 300 },
},
],
所有项目代码也发了过去
logicflow-demo.zip

logicflow/core版本

2.0.9

logicflow/extension版本

2.0.13

logicflow/engine版本

No response

浏览器&环境

Chrome

@xunyuwenruo xunyuwenruo added the bug Something isn't working label Jan 9, 2025
@CuiChengweb
Copy link

老哥,升级到2.0.10的版本就没这个问题了

@xunyuwenruo
Copy link
Author

xunyuwenruo commented Jan 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants