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]: 调用getGraphRawData+renderRawData以保存重绘后,原先调整过的连线恢复为了默认。 #2055

Closed
yangbocheng opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@yangbocheng
Copy link

发生了什么?

当使用Logicflow试图实现保存数据后,重绘功能时,vue3使用了如下代码测试。

按如下步骤简单复现

  1. 拖拽创建2个简单图形, 并将2个图形的正上方连线
  2. 依次执行下面的onTestClear, onTestReDraw 2个方法,用于保存清空,后重绘
  3. 观察界面,发现连线位置 变了

怎么才能让连线的位置重绘后依然一致呢?

let tempdata = undefined as any;
let temptrans = undefined as any;

const onTestClear=()=>{
  let lf = lfref.value;
  let data = lf.getGraphRawData();
  tempdata = cloneDeep(data);
  lf.clearData();
}

const onTestReDraw=()=>{
  let lf = lfref.value;
  lf.renderRawData(tempdata);
}

之前创建的图像
Image
保存数据后重绘

Image

logicflow/core版本

2.0.9

logicflow/extension版本

2.0.13

logicflow/engine版本

No response

浏览器&环境

Chrome

@yangbocheng yangbocheng added the bug Something isn't working label Jan 24, 2025
@yangbocheng
Copy link
Author

升级到2.0.10 就正常了,谢谢!

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

1 participant