FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

changed getX and getY to getRawX and getRawY for CustomPanGestureDetector by JoshDSommer · Pull Request #2114 · NativeScript/NativeScript · GitHub

Repository navigation

changed getX and getY to getRawX and getRawY for CustomPanGestureDetector - #2114

Closed
JoshDSommer wants to merge 1 commit into
NativeScript:masterfrom
JoshDSommer:use-getRawX-Y-instead-of-getX-Y-to-allow-smoother-panning-coordinates
Closed

JoshDSommer wants to merge 1 commit into
NativeScript:masterfrom
JoshDSommer:use-getRawX-Y-instead-of-getX-Y-to-allow-smoother-panning-coordinates

Conversation

Copy link
Copy Markdown
Contributor

Relates to issue #2113

getRawX & Y always return the X & Y coordinates relative to the view
getX and getY sometimes return coordinates that are relative to the
previous motion. this update will allow smoother coordinates on panning
instead of occasional jumping back and fourth of the delta X and Y
coordinates

getRawX & Y always return the X & Y coordinates relative to the view
getX and getY sometimes return coordinates that are relative to the
previous motion. this update will allow smoother coordinates on panning
instead of occasional  jumping back and fourth of the delta X and Y
coordinates

ns-bot commented May 14, 2016

Copy link
Copy Markdown

Can one of the admins verify this patch?

enchev commented May 16, 2016

Copy link
Copy Markdown
Contributor

run ci

Copy link
Copy Markdown
Contributor Author

I'm sorry, I don't follow. What is CI?

enchev commented May 16, 2016

Copy link
Copy Markdown
Contributor

Hey @TheOriginalJosh,

I've just ran (run ci command) our local CI (continues integration) to check if everything is running properly with your pull request. :)

Copy link
Copy Markdown
Contributor Author

@enchev Cool, if you have any problems or questions. Don't hesitate to ask.

Copy link
Copy Markdown
Contributor

Hey @TheOriginalJosh - thanx for the PR,
However, I have concerns about it.
The loop variable i is not used inside the loop. The idea of the method is to get the center of the gesture - which is median point of all the current pointers. That's why the original code sums the coordinates of all the pointers and the takes the average of them. The code in the PR will take into account only one of the pointers - so if you are panning with more than one finger it will not work correctly.

Actually - the getRawX() methods will return screen coordinates. That said, I agree that using the getRaw methods will be more stable, especially if you are changing the layout of the element that is being panned.

Copy link
Copy Markdown
Contributor

Closing the in favor of #2118 which includes the multi-touch scenario.

vakrilov closed this May 16, 2016

Copy link
Copy Markdown
Contributor Author

@vakrilov Np, when I tested it on my phone, which is a Nexus 5x with Android Marshmellow, I was able to use multi-touch without a problem. Changing the layout is where I had the problems, not so much problems but just occasional inconsistency with the delta coordinates that end up causing a jumpiness​ that i wasn't getting on ios.

lock Bot commented Aug 28, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock Bot locked and limited conversation to collaborators Aug 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL