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

分组缩放 #1416

Closed
Gxiao0906 opened this issue Nov 7, 2023 · 1 comment
Closed

分组缩放 #1416

Gxiao0906 opened this issue Nov 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Gxiao0906
Copy link

Gxiao0906 commented Nov 7, 2023

发生了什么?

  1. 分组缩放后,使用this.lf?.getGraphRawData()获取数据,重新渲染流程图 this.lf?.render(),节点之间连接线坐标出现偏差。
  2. 代码:
    import { GroupNode } from '@logicflow/extension'; class WhenGroup extends GroupNode.view {} class WhenGroupModel extends GroupNode.model { getNodeStyle() { // const style = super.getNodeStyle(); // style.stroke = '#AEAFAE'; // style.strokeDasharray = '33'; // style.strokeWidth = 1; const style = super.getNodeStyle(); style.stroke = '#989891'; style.strokeWidth = 1; style.strokeDasharray = '3 3'; if (this.isSelected) { style.stroke = 'rgb(124, 15, 255)'; } if (this.isFolded) { style.fill = '#47C769'; } return style; } initNodeData(data) { super.initNodeData(data); this.text.editable = false; this.isRestrict = true; this.resizable = true; this.foldable = true; this.width = 500; this.height = 300; this.foldedWidth = 50; this.foldedHeight = 50; this.setProperties({ nodeType: 'WHEN', }); const rule = { message: '不能连接自己', validate: (sourceNode, targetNode) => { return sourceNode.id !== targetNode.id; }, }; this.sourceRules.push(rule); } getAnchorStyle(anchorInfo) { const style = super.getAnchorStyle(anchorInfo); style.stroke = '#666'; style.fill = '#fff'; style.hover.fill = 'transparent'; style.hover.stroke = 'transparent'; return style; } } export default { type: 'WhenGroupNode', view: WhenGroup, model: WhenGroupModel, };

logicflow/core版本

^1.2.3

logicflow/extension版本

^1.2.3

logicflow/engine版本

No response

浏览器&环境

Chrome

@Gxiao0906 Gxiao0906 added the bug Something isn't working label Nov 7, 2023
Copy link

github-actions bot commented Nov 7, 2023

该 issue 作为 Bug Report 所提供信息的不充分,被暂时关闭了。请修改 issue 以提供最小可复现示例(可以通过以下方式:1. 在任意在线编码平台如 codesanbox 编写示例。将其保存到自己空间,然后贴上链接。2. 在自己 github 中创建一个最简单的示例,然后贴上 github 链接。3. 删除项目中的 node_modules 部分,打包项目,并拖拽到 issue 输入框中上传(或提供远程可下载地址))来重启 issue。

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
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