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 viewport transform #5979

Merged
merged 3 commits into from
Jul 4, 2024
Merged

fix: fix viewport transform #5979

merged 3 commits into from
Jul 4, 2024

Conversation

Aarebecca
Copy link
Contributor

@Aarebecca Aarebecca commented Jul 3, 2024

  • 修复视口变换导致的 fitView/fitCenter/focusElement 问题

问题原因,之前由于历史原因,具有动画的视口变换采用 camera.gotoLandmark 实现,无动画的视口变换通过 rotate/pan/setZoomByViewportPoint 实现。两者混合调用时会出现异常,主要是 pan 通过旋转相机实现平移,不会改变视点位置


  • fix the viewport fitView/fitCenter/focusElement problem caused by transformation

Previously, due to historical reasons, the viewport transformation with animation was implemented by camera.gotoLandmark, while the viewport transformation without animation was implemented by rotate / pan / setZoomByViewportPoint. Exceptions occur when the two are called together, mainly because pan implements translation by rotating the camera, without changing the viewpoint position

Relative Fix: antvis/G#1721

ISSUE:

@Aarebecca Aarebecca merged commit c087056 into v5 Jul 4, 2024
5 checks passed
@Aarebecca Aarebecca deleted the fix/viewport branch July 4, 2024 02:13
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.

1 participant