Skip to content

Transforming points #141

@rparrett

Description

@rparrett

Hello, thanks for working on this library.

Inside of my ReactNativeZoomableView I have an image, which contains distinct "snapping points." When a user taps the RNZV, I look up the nearest snapping point, and can place an Indicator on that spot with some basic math. So far, so good.

However, also want to position a Menu , which exists as a sibling to the RNZV in the hierarchy, at this "snapped point".

How can I transform an arbitrary point in "image space" to screen / view space? I see offsetX etc, but I seem to be pretty confused because no combination of offset / zoom level / etc seem to produce values that make sense.

<BottomTabNavigator>
  <View>
      <ReactNativeZoomableView>
          <Image/>
          <Indicator/>
      </ReactNativeZoomableView>
      <Menu />
  </View>
</BottomTabNavigator>

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