wieslawsoltes / PanAndZoom

Pan and zoom control for Avalonia.
http://wieslawsoltes.github.io/PanAndZoom/
MIT License
345 stars 45 forks source link

Update Offset and Zoom property on touch input #31

Closed MaxWheal closed 4 years ago

MaxWheal commented 4 years ago

I found that on touch inputs the Offset and Zoom properties did not get updated. I used these to differentiate between a drag/zoom and a click to select a drawn child on the canvas. If that addition is ok for you too I would be glad to contribute. Thanks for the nice project

wieslawsoltes commented 4 years ago

I do not have touch enabled device so I can not really test. I think current touch support needs to be reworked. It should update the _matrix and call Invalidate().

wieslawsoltes commented 4 years ago

@MaxWheal I have pushed some changes to your branch. Please check if this works for you.

MaxWheal commented 4 years ago

Your changes work for me on touch and mouse usage. No problems so far. If you wish to test the touchsupport on your own I recommend this Methode. For me this worked out nicely slim and accurate. And I could verify the results with my Surface Pro 4 as well.