Browse Source

no need for layout scale to be taken into account because touch events are already scaled

pull/347/head
donandren 11 years ago
parent
commit
2248a4b5a8
  1. 7
      src/iOS/Perspex.iOS/PerspexView.cs

7
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<IPlatformSettings>().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;
}

Loading…
Cancel
Save