Skip to content
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

OnLayout not returning position with respect to screen #15535

Closed
James2516 opened this issue Aug 17, 2017 · 1 comment
Closed

OnLayout not returning position with respect to screen #15535

James2516 opened this issue Aug 17, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@James2516
Copy link

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.45.1
  2. node -v: v6.11.0
  3. npm -v: 3.10.10

Then, specify:

  • Target Platform: Android
  • Development Operating System: Windows
  • Build tools:

Steps to Reproduce

(Write your steps here:)

I need to detect if component A's position is within component B when pan gesture (drag) on A is released. However, the position from onPanResponderRelease's gesture.moveY is measured with respect to the entire screen, whereas the position returned from A's onLayoutis measured with respect to the parent view. So i'd need to know the parent view's current height to reconcile the differences.

Expected Behavior

There should be a function to return the position with respect to the entire screen.

Actual Behavior

see above

Reproducible Demo

see above

@hramos
Copy link
Contributor

hramos commented Aug 17, 2017

Thanks for opening the issue! As it happens, we're using GitHub to track bugs in React Native. If you'd like to submit this as a feature request, please go ahead and create an entry on Canny. It has a voting system and if the feature gets a good amount of votes, it will have a greater chance of being implemented by the community. Closing this now, thanks for understanding!

@hramos hramos closed this as completed Aug 17, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Aug 17, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants