Skip to content

fix: apply initial scale on KeepScale mount #534

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

y-solb
Copy link

@y-solb y-solb commented Apr 24, 2025

Summary

This PR fixes an issue where the KeepScale component did not apply the initialScale when first mounted. The scale transform was only being updated on change events, causing the element to appear unscaled initially.

Changes

  • Apply applyScale once on mount using instance.transformState.scale

Context

Previously, the scale was only applied after a transformState change, which meant the element rendered with an incorrect scale until the user interacted or zoomed.

Impact

  • Ensures the correct visual scaling from the initial render
2025-04-24.11.29.11.mov

Thanks!

@y-solb y-solb requested a review from prc5 as a code owner April 24, 2025 14:33
@y-solb y-solb force-pushed the fix/keep-scale-initial-transform branch from df0bf5f to 7bbdab1 Compare April 24, 2025 14:59
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