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]: 自定义节点转xml后再转回来回显节点位置有偏移 #1829

Open
jisuwoniusxy opened this issue Aug 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jisuwoniusxy
Copy link

发生了什么?

自定义节点转xml后再转回来回显节点位置有偏移, 从操作台拖拽出来和直接写数据出来的都是正常的就是转换后再转回来就有偏移
最新版,以前的版本没试
微信截图_20240828142957

logicflow/core版本

2.0.3

logicflow/extension版本

2.0.5

logicflow/engine版本

No response

浏览器&环境

Chrome, NodeJS

@jisuwoniusxy jisuwoniusxy added the bug Something isn't working label Aug 28, 2024
@jisuwoniusxy
Copy link
Author

自定义节点类型代码:
class CustomRectModel extends RectNodeModel {
  getNodeStyle() {
    const style = super.getNodeStyle();
    const properties = this.properties;
    properties.calledElement='';// 业务属性calledElement(子流程指向的流程id)
    return style;
  }
}
class CustomRectNode extends RectNode {}
// 自定义节点
const useNodeStyle={
  type: 'bpmn:callActivity',
  // id: 'Activity_'+randomString(10),
  view: CustomRectNode,
  model: CustomRectModel,
}

// 自定义节点数据
let logicFlow_data = {
  nodes: [
    {
      // id: '3',
      type: 'bpmn:callActivity',
      x: 300,
      y: 200,
      text: 'callActivity',
      properties: {
        statu: 'callActivity',
      },
    },
  ],
}

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
@jisuwoniusxy and others