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: Fixed the issue of abnormal scaling behavior of the Image compon… #2407

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

YyumeiZhang
Copy link
Collaborator

…ent in the case of customContainer

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #2266
#2293 中,为修复 #2266 问题,修改了缩放计算的算法,其中使用了 event.clientX 和 event.clientY作为计算依据,但是在自定义渲染容器时候,event.clientX 和 event.clientY 并非和容器左上角到鼠标位置的x,y方向距离一致,因此计算出来的值不正确。本 PR 中修改了计算的算法,不依赖 event.clientX 和 event.clientY进行计算。

Changelog

🇨🇳 Chinese

  • Fix: 修复在 Image 的缩放中心算法变化后(v2.64.0-beta.0), 自定义渲染容器时,缩放行为异常问题

🇺🇸 English

  • Fix: Fixed the issue of abnormal scaling behavior when customizing the rendering container after the zoom center algorithm of Image changed (v2.64.0-beta.0)

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

codesandbox-ci bot commented Aug 12, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5c82888:

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Aug 12, 2024



Test summary

267 0 11 0


Run details

Project semi-design
Status Passed
Commit c0ea119 ℹ️
Started Aug 12, 2024 6:30 AM
Ended Aug 12, 2024 6:40 AM
Duration 10:05 💡
OS Linux Debian -
Browser Chrome 103

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

@DaiQiangReal DaiQiangReal merged commit 32acd88 into main Aug 12, 2024
8 of 9 checks passed
@DaiQiangReal DaiQiangReal deleted the fix/ImagecustomContainer branch August 12, 2024 08:08
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.

[Image] 鼠标滚轮缩放图片后,拖动了图片,再次缩放后会重置回中心位置
2 participants