From 2248a4b5a8d52def240b9485076c93215550266d Mon Sep 17 00:00:00 2001 From: donandren Date: Sat, 5 Dec 2015 21:09:53 +0200 Subject: [PATCH] no need for layout scale to be taken into account because touch events are already scaled --- src/iOS/Perspex.iOS/PerspexView.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/iOS/Perspex.iOS/PerspexView.cs b/src/iOS/Perspex.iOS/PerspexView.cs index 4adfb98790..5a87b38e96 100644 --- a/src/iOS/Perspex.iOS/PerspexView.cs +++ b/src/iOS/Perspex.iOS/PerspexView.cs @@ -168,14 +168,11 @@ namespace Perspex.iOS RawMouseEventType.Move, location, InputModifiers.LeftMouseButton)); else { - double x = location.X - _touchLastPoint.X; - double y = location.Y - _touchLastPoint.Y; + //magic number based on test - correction of 0.02 is working perfect double correction = 0.02; - var scale = PerspexLocator.Current.GetService().RenderScalingFactor; - scale = 1; Input?.Invoke(new RawMouseWheelEventArgs(PerspexAppDelegate.MouseDevice, (uint)touch.Timestamp, - _inputRoot, location, new Vector(x * correction / scale, y * correction / scale), InputModifiers.LeftMouseButton)); + _inputRoot, location, (location - _touchLastPoint)* correction, InputModifiers.LeftMouseButton)); } _touchLastPoint = location; }