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

fix: fix point scale generates gradient color #5977

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

li1615882553
Copy link
Contributor

Checklist
  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

解决问题:
1.fixes #5230 修复x轴为point类型坐标系时,拖动Slider计算渐变色产生undefined的问题

解决方案:
1.针对拖动Slider产生的NaN,数据不参与映射,直接返回0

修复后:

Dec-19-2023.20-51-22.mp4

Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复得很简洁,但是还需要添加一下截图测试,参考这个:#5914

src/shape/utils.ts Outdated Show resolved Hide resolved
@pearmini
Copy link
Member

pearmini commented Jan 3, 2024

@li1615882553 有看看 CR 哈 🤣

@li1615882553
Copy link
Contributor Author

@li1615882553 有看看 CR 哈 🤣

嗯嗯,发现了个新问题还没解决:计算渐变色没有考虑起始线条断开的情况,如果起始线条是断开的,会导致渐变色向后移动
正常情况:
image
起始断开情况:
image

@pearmini
Copy link
Member

pearmini commented Jan 5, 2024

@li1615882553 有办法解决吗?

@li1615882553
Copy link
Contributor Author

@li1615882553 有办法解决吗?

这周末我再看一下

Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@pearmini pearmini merged commit 039716f into antvis:v5 Jan 9, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

开启.style('gradient', 'color')之后slider拖动报错, 例子如下
2 participants