-
Notifications
You must be signed in to change notification settings - Fork 59
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
Pan and Zoom not working #62
Comments
I also had the same problem. I debugged the ExampleBrowser running on iOS and I tracked the problem down to 2 issues with OxyPlot.Core. Number 1 The constructor for PlotController installs 2 TouchDown bindings, the first is for handling Pan/Zoom and the second is for handling a tracker. Well, in the constructor, you will see multiple items being bound to the same event, however, those allow multiple bindings per event as long as the modifier is different. A modifier would be like which keyboard key or which mouse button. However, touch is touch with no modifier. This means the second binding for TouchDown (for the tracker) OVERWRITES the first binding for TouchDown (panning/zooming). So the first fix is to comment out the second tracker binding. Number 2 Even after fixing problem number 1 above, panning/zooming on touch devices still doesn't work. This is because the Tracker touch manipulator extends the touch manipulator but the touch manipulator does NOT default the panning/zooming support to true. So the fix is to add a line to the constructor of TouchManipulator to set SetHandledForPanOrZoom = true; |
@scastria I came across the same issues with Windows.Forms. But I also noticed, that Number 2 is fixed with oxyplot/oxyplot#1184 Currently, I'm working on a fix for Number 1. As soon as I got my pull request ready, I'll attach it here. |
Hello! Is there an update on this issue? I'm using OxyPlot.Core and OxyPlot.Xamarin.Android NuGets which are re-installed on 5/10/2018. I can't zoom the graphs using code. Touch zoom works properly. |
Hello |
I don´t know the status on this issue. We depend on contributions to get this fixed! |
I work with WPF, touch and pan was not working out of the box, with a little research I found that SnapTrackTouch is causing this issue. Binding to my own controller and unbinding all TouchDown commands from it, fixed touch input. I just had to bind PanZoomByTouch again:
In fact, both SnapTrackTouch and PanZoomByTouch work fine separately but not together. Snap track in my opinion could be disabled by default, it's not useful on a touch screen, the point tooltip is only visible for a split second. Or am I wrong and it can be used for other things as well? |
Hi all,
I have a problem with my plotview in Xamarin forms, i see it but when i try to pan or zomm on it, it's not work.
This is my code in C#:
And this is View on XAML:
Any idea for resolve that?
Thanks in advance
The text was updated successfully, but these errors were encountered: