antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
564 stars 233 forks source link

EdgeComponent对应线形属性strokeDasharray回显BUG #377

Closed BoringSoul-nsz closed 1 year ago

BoringSoul-nsz commented 1 year ago

问题描述

https://github.com/antvis/XFlow/blob/master/packages/xflow-extension/src/flowchart-editor-panel/control-map-service/components/edge.tsx EdgeComponent对应线形属性修改问题,无论选择实线还是虚线,select都展示虚线。 是因为ArrowStrokeMaps的数据类型和getSrokeDashValue的判断逻辑不符。

const ArrowStrokeMaps = {
  solid: [0, 0],
  dash: [5, 5],
}

但是判断线形数值回显的逻辑是

const getSrokeDashValue = () => {
  const { attrs = {} } = edgeConfig
  const { line = {} } = attrs
  return line.strokeDasharray ? 'dash' : 'solid'
}

重现链接

https://charts.ant.design/zh/examples/flowchart/basic/#complex-form

重现步骤

1、进入页面; 2、创建两个节点,连线,选中连线,修改对应的线形属性,无论如何修改,select都会回显虚线;

预期行为

预期回显的是选中的值,但是实际效果是无论如何修改都显示虚线;

平台

屏幕截图或视频(可选)

image

补充说明(可选)

No response

xflow-bot[bot] commented 1 year ago

👋 @BoringSoul-nsz

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

xflow-bot[bot] commented 1 year ago

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the AntV community! 💪💯

xflow-bot[bot] commented 1 year ago

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the AntV community! 💪💯

xflow-bot[bot] commented 3 weeks ago

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.