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: overriding style.d causes custom rendering errors #6603

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

BQXBQX
Copy link
Contributor

@BQXBQX BQXBQX commented Feb 13, 2025

Checklist
  • npm test passes
  • commit message follows commit guidelines
Description of change
image 感觉这段代码是冗余代码,并没有发挥真正的用处,只是重新根据坐标计算路径,甚至还和之前根据 shape 生成的路径还发生了冲突,导致自定义 shape 无法正确渲染 image
修正方案

模仿直角坐标系 scalelnY 动画处理方案,不对 onframe 和 onfinish 进行处理,直接返回

单测发生错误原因

应该是不同的计算方案导致出现些许的位置误差,已经直接覆盖原来快照。

fixed #6564

Copy link

概述

此PR修复了覆盖style.d导致自定义渲染错误的问题。通过模仿直角坐标系scalelnY动画处理方案,移除了对onframeonfinish的处理,直接返回以避免路径计算冲突。

变更

文件 概要
tests/integration/issue-6564.spec.ts 添加了新的测试用例以验证修复效果。
tests/integration/snapshots/* 更新了多个快照文件以反映修复后的渲染结果。
tests/plots/bugfix/index.ts 导出新的issue6564函数。
tests/plots/bugfix/issue-6564.ts 添加了新的函数以处理自定义切片形状的渲染。
src/animation/scaleInY.ts 移除了冗余代码,简化了动画处理逻辑。

@hustcc hustcc merged commit cbff5f0 into antvis:v5 Feb 13, 2025
2 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13302480835

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 86.701%

Totals Coverage Status
Change from base Build 13258309522: 0.001%
Covered Lines: 10603
Relevant Lines: 11855

💛 - Coveralls

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.

在极坐标系下,使用 custom shape,默认动画会复写 style.d 导致 custom 渲染错误
3 participants