Skip to content

Conversation

@qsavoye
Copy link

@qsavoye qsavoye commented Dec 5, 2025

Description

This PR fixes an issue where the zoomToElement function in TransformWrapper incorrectly calculates the target position when a parent TransformWrapper has a zoom value different from 1.

Before the Fix

When calling zoomToElement on a child TransformWrapper with a parent that has zoom !== 1, the element would not be centered or zoomed correctly.

After the Fix

The zoomToElement function now correctly accounts for parent transformations, ensuring the target element is properly centered and zoomed regardless of the parent zoom state.

How to Test

  1. Create a nested structure with multiple TransformWrapper components.
  2. Set a zoom value different from 1 on a parent TransformWrapper.
  3. Call zoomToElement on a child TransformWrapper.
  4. Verify that the element is correctly centered and zoomed.

@qsavoye qsavoye requested a review from prc5 as a code owner December 5, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant