Skip to content

Fix regression caused by the refactor which had disabled scaling in AR mode#5052

Merged
samaneh-kazemi merged 2 commits intomasterfrom
refactor
Jun 10, 2025
Merged

Fix regression caused by the refactor which had disabled scaling in AR mode#5052
samaneh-kazemi merged 2 commits intomasterfrom
refactor

Conversation

@samaneh-kazemi
Copy link
Collaborator

Reordered the input processing to check for two-finger interaction first

  • Added proper state management for firstRatio to ensure it's only set once when scaling starts
  • Improved the handling of state transitions between different interaction modes
  • Made sure the scaling state is properly reset when fingers are removed

The key changes are:

  • We now check for two-finger interaction before any other state checks
  • We properly initialize firstRatio only when needed
  • We properly clean up the scaling state when fingers are removed
  • We maintain the scaling state throughout the interaction

This restores the scaling functionality in AR mode. The main issue was that we weren't properly maintaining the scaling state and the firstRatio value, which is crucial for calculating the correct scale.

@samaneh-kazemi samaneh-kazemi merged commit 0548040 into master Jun 10, 2025
6 checks passed
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