-
Notifications
You must be signed in to change notification settings - Fork 7
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
Zoom is not working on iOS #10
Comments
Does the sample here has a plot where zoom is supported in iOS? @janusw |
Actually most of the samples in the ExampleBrowser should support zoom, e.g. the first one in the list (Annotations -> Tool tips). Panning and zooming that example works well for me on Android.
Yes, I can confirm that zooming via two-finger pinch gesture does not work at all on iOS. Single-finger panning seems to work well, though. What @RobertStefancic means by "snappy behavior" is probably that the plot sometimes jumps around wildly when using two-finger pinch. |
AFAICS the problem is that iOS always generates TouchAction events with a single point only ... oxyplot-maui/Source/OxyPlot.Maui.Skia/Platforms/iOS/Effects/PlatformTouchEffect.cs Lines 170 to 171 in e2f1eb2
... while Android generates touch events with multiple points: oxyplot-maui/Source/OxyPlot.Maui.Skia/Platforms/Android/Effects/PlatformTouchEffect.cs Lines 105 to 106 in e2f1eb2
|
I took a first stab at fixing it on this branch: https://github.com/janusw/oxyplot-maui/tree/iOS_fix_zoom It basically makes zooming work in iOS, but in some cases it seems to behave strangely. I'll need to take another look at it soon ... |
@janusw, Actually I have made a fix for this which is working fine, If possible to give me the permission, I can raise a PR for the same. |
You should be able to create a PR: Just fork the repo, make a new branch, commit your changes, push them, and open a PR for that branch. |
Hello @janusw and @jaisont07. I have also developed a solution for the issue that has been accepted and already used in production. Unfortunately I have not been able to create a PR yet due to some issues with GitHub here at work. I planned to do it from my personal account at home, but didn't have the opportunity just yet. However, I will paste the code here until then. If you find that it's working for you as well, I don't mind you integrating it.
|
Raised a PR |
Awesome, thanks. I'm currently traveling and won't be able to review it before next week. In the meantime, could you please check the differences to my branch mentioned above: https://github.com/janusw/oxyplot-maui/tree/iOS_fix_zoom What are you doing differently? And why do you do it like that? |
If you want this to be considered for inclusion in the repo, please push it to a branch on your fork (and open a PR). Seems like we have three fixes by now that we can cross-check against each other 😊 |
This issue is fixed via #15. |
The fix is available in version 1.0.1, which was just released. |
The TouchRecognizer is not receiving all touch input events, which results in slow and snappy behavior when trying to pan/zoom on the plot.
The text was updated successfully, but these errors were encountered: