Skip to content

How to solve the inaccurate moving distance caused by zooming while moving? #236

@N1cholas

Description

@N1cholas

Scenario: Moving down 100 while zooming 2 times

Result: Moving distance less than 100

handleAnimate = ({ progress }) => {
    const scaleInterpolation = progress.interpolate({
      inputRange: [0, 1],
      outputRange: [1, 2],
    })
    const translateYInterpolation = progress.interpolate({
      inputRange: [0, 1],
      outputRange: [0, 100],
    })
    return {
      transform: [{ translateY: translateYInterpolation }, { scale: scaleInterpolation }],
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions